






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







1.1 What is an operating system?
Operating systems are an essential part of any computer system. An operating system (OS) is software, which acts as an intermediary between the user of a computer system and the computer hardware (Figure 1). The purpose of an operating is to provide an environment in which a user can execute programs in a convenient and efficient manner (Hayhurst 2002).
Figure 1. Abstract view of the components of a computer system. (Source: Silberschatz et al. 2002)
A computer system can be divided roughly into four components: (1) the hardware, (2) the operating system, (3) the application programs, and (4) the users. (1) Hardware: which provides the basic computing resources: o CPU: Central processing unit; executes commands
o Memory: Contains programs and associated data while they execute. Before anything can be executed it must be loaded into memory o I/O devices: Printers, disk drives, etc (2) Operating system: controls and coordinates the use of the hardware among the various application programs for the various users. It is responsible for: o Provides an environment within which programs can be executed o Handles communications between application software and I/O devices through the use of device drivers o Manages memory when multiple programs are executing simultaneously. Loading programs & data into memory. Processing memory needs of programs. Ensuring that programs do not overwrite the memory space “owned” by each other.
(3) Application programs: product or custom written software which defines the ways in which the system resources are used to solve some computing problems: compilers, database systems, word processors). System programs: provide system services to users of the operating system and define a user’s view of the operating system. (4) Users: People, machines, and other computers that interact with the computer system to accomplish some task
1.2 Views of OS
The role of the OS and the services it must provide can be viewed from two different viewpoints (Hayhurst 2002):
(1) The Users Viewpoint
From the Users viewpoint we use a computer system to accomplish some task. The OS is a tool which helps in that task. The OS’s role can vary depending on the type of system being used: Some systems such as PC operating systems are designed with ease of use as the primary goal. In a Multi-user system where users share resources of a mainframe or minicomputer the OS should be designed to maximize resource utilization to ensure that: 1) all available CPU time, memory and I/O resources are used efficiently.
(2) The Systems Viewpoint
From the computer’s viewpoint the OS is the program that is the most intimate with the hardware. The OS acts as a:
o SINGLE USER MACHINE: there was a long wait by other users.
Figure 2. Migration of OS concepts and features. (Source: Silberschatz et al. 2002)
(2) 1950’s – 60’s: beginning of Batch operating systems
This is a time period of great change in computing:
was necessary to go through several preparation steps (Figure 3): (remember that only machine code can be directly executed by the CPU)
Figure 3. Compilation process. (Source: Hayhurst 2002)
Compiler
Assembly language output
Assembler Machine language output
High-l Langu
evel age program
Another way professional operators could improve the performance of the system was to group/batch together jobs with similar resource needs and run them through the computer as a group to reduce set up time. The operator prepared sequential tapes of these jobs (could read the jobs into the system via punched cards, and write them to a tape.) which could be run through the CPU together in a “batch”.
However, there were still problems. If a job stopped the operator would have to notice that it stopped (either normal or abnormal termination), determine why it stopped, dump memory and registers if necessary, load the appropriate device with the next job and restart the computer. If this occurred, the CPU was sitting idle.
To overcome CPU idle time, the automatic job sequencing was developed, and thus the 1st^ rudimentary operating systems were created. A Resident Monitor (RM) is a small program created to transfer control automatically from one job to the next. The resident monitor is ALWAYS in memory. The RM does not decide the order of jobs, but does coordinate their sequencing, automatically starting and terminating jobs
The RM had several identifiable parts:
(1) The control-card interpreter which was responsible for reading and carrying out the instructions on the control cards at the point of execution.
(2) The loader which is invoked by the control card interpreter to load systems programs and application programs into memory.
(3) Device drivers which are used by both the control card interpreter and the loader for the systems I/O devices to perform I/O. Often system and
be copying data from disk to the printer while the CPU has begun execution of another job. It also allows the CPU to store output on disk if the printer is full, and MOVE ON.
Spooling has a direct beneficial effect on the performance of the system as it can keep both the CPU and I/O devices working at much higher rates.
However, wait times were still too long. Long jobs (high resource needs) delay everything else. Also scheduling was a delicate task. When we ran high resource jobs, one might take over 1 day.
Spooling naturally leads to Multiprogramming that is the foundation of all modern operating systems.
The most important aspect of job scheduling is the ability to multi-program. A single user cannot, in general, keep either the CPU or the I/O devices busy. Multiprogramming increases utilization by organizing jobs so that the CPU always has one to execute:
(3) 1970’s – 80’s Interactive time sharing (multi-tasking) on mainframes
running. If time slicing is fast enough users can feel as if they have their own dedicated machine.
Arguably, one of the most popular and widely used time-sharing systems is UNIX.
1.4 Types of OS Systems
(1) Mainframe systems
Mainframe computer systems were the first computers used to tackle many commercial and scientific applications. These systems evolved from simple batch system, where the computer runs one application, to time-sharing systems, which allow for user interaction with the computer system. Early computers were physically enormous machines run from a console. The common input devices were card readers and tape devices while the common output devices were line printers, tape drives, and card punches. The user did not interact directly with the computer systems. Rather, the user prepared a job that consisted of the program, the data, and some control information about the nature of the job (control cards) and submitted to the computer operator. The operating system in these early computers was fairly simple. Its major task was to transfer control automatically from one job to the next. The OS was always resident in memory.
(2) Desktop systems
Personal computers (PCs) appeared in the 1970s. During their first decade, the CPUs in PCs lacked the features needed to protect an operating system from user programs. PC operating systems therefore were neither multi-user nor multitasking. These systems include PCs running Microsoft Windows and the Apple Macintosh. The MS-DOS from Microsoft has been superseded by multiple flavors of Microsoft Windows.
(3) Multiprocessor systems
Most systems to date are single-processor systems; that is they have only one main CPU. However, multiprocessor systems (also known as parallel systems) are growing in importance. Such systems have more than one processor in close communication, sharing the computer bus, the clock, and sometimes memory and peripheral devices. Multiprocessor systems have three main advantages: (a) Increased throughput. By increasing the number of processors, we hope to get more work done in less time. (b) Economy of scale. Multiprocessor systems can save more memory than multiple single-processor systems, because they can share peripherals, mass storage, and power supplies. (c) Increased reliability. If functions can be distributed properly among several processors, then the failure of one processor will not halt the system, only slow it down.
The most common multi-processor systems now use symmetric multiprocessing (SMP), in which each processor runs an identical copy of the operating system, and these copies communicate with one another as needed. SMP means that all processors are peers; no master-slave relationship exists between processors (Figure 5). Some systems use asymmetric multiprocessing, in which each processor is assigned a specific task. A master processor controls the system; the other processors either look to the master for instruction or have predefined tasks.
Figure 5. Symmetric multiprocessing architecture. (Source: Silberschatz et al. 2002)
(4) Distributed systems
A network , in the simplest terms, is a communication path between two or more systems. Distributed systems depend on networking for their functionality. By being able to communicate, distributed systems are able to share computational tasks, and provide a rich set of features to users. Networks vary by the protocols used, the distances between nodes, and the transport media. TCP/IP (transmission control protocol/internet protocol) is the most common network protocol, although other protocols are also used. Most operating systems support TCP/IP, including the Windows and UNIX. Networks are typecast based on the distances between their nodes. A local-area network (LAN) exists within a room, a floor, or a building. A wide-area network (WAN) usually exists between buildings, cities, or countries. The growth of computer networks – especially the Internet and World Wide Web (WWW) – has had a profound influence on the recent development of operating systems. When PCs were introduced in 1970s, they were designed for “personal” use and were generally considered standalone computers. With the beginning of widespread public use of the Internet in the 1980s for electronic mail, ftp, and gopher, many PCs became connected to computer networks. With the introduction of the Web in the mid-1990s, network connectivity became an essential component of a computer system. Virtually all modern PCs and workstations are capable of running a web browser for accessing hypertext documents on the Web. The general structure of a client-server system is depicted in Figure 6.
Figure 6. General structure of a client-server system. (Source: Silberschatz et al. 2002)
(5) Real-time systems
Another form of a special-purpose operating system is the real-time system. A real-time system is used when rigid time requirements have been placed on the operation of a processor or the flow of data; thus, it is often used as a control device in a dedicated application. Systems that control scientific experiments, medical imaging systems, industrial control systems, and certain display systems are real-time systems. Some other systems include home-appliance controllers and weapon systems.