Presentation on theme: "Lecture 1: History of Operating System"— Presentation transcript:
1 Lecture 1: History of Operating System Spring 2007Chapter 1 of textbook
2 Outline What is Operating System OS as User/Computer Interface Services provided by OSOS as Resource ManagerEvolution of OS
3 What is Operating System? An operating system is a program that controls the execution of application programs and acts as an interface between applications and the computer hardware.Three objectives of operating systems:ConvenienceMakes a computer more convenient to useEfficiencyAllows the computer system resources to be used in an efficient mannerAbility to evolvePermit the effective development, testing, and introduction of new system functions without interfering with service
4 OS as User/Computer Interface EndUserProgrammerApplicationProgramsUtilitiesOperating-SystemDesignerOperating-SystemComputer Hardware
5 Services provided by the operating systems Program DevelopmentOS provides a variety of facilities and services, such as editors and debuggers, to assist the programmer in creating programs. Typically, these services are in the form of utility programs that, while not strictly part of the core of the OS, are supplied with the OS and are referred to as application program development tools.Program ExecutionA number of tasks need to be performed before we can execute a program. Instructions and data must be loaded into main memory. I/O devices and files must be initialized, and other resources must be prepared. The OS handles these duties for the user.
6 Services provided by the operating systems (cont.) Access to I/O DevicesEach I/O devices requires its own peculiar set of instructions or control signals for operating. The OS provides a uniform interface that hides these details so that the programmer can access such devices using simple reads and writes.Controlled Access to FileThe OS must provide protection mechanisms to control access to the files for different users. Certain files can read only, or write only, or execute only. The OS must enforce the access mechanism.System AccessIn the case of a shared or public system, the OS control access to the system as a whole and to specific system resources.
7 Services provided by the operating systems (cont.) Error Detection and ResponseA variety of errors can occur while a computer system is runningInternal and External hardware errors such as memory error, device failure, or malfunctions.Software error such as arithmetic overflow or underflow, attempt to access forbidden memory locationsOperating system cannot grant request of applicationAccountingCollect usage statisticMonitor performanceUsed to anticipate future enhancementprepare billing information
8 OS as Resource Manager Computer System I/O devices Memory OS Software I/O controllerprintersProgramsanddataI/O controllerKeyboardsetc..I/O controller…Auxiliarystoragedevices,disks, tapesprocessorprocessor
9 OS as Resource Manager (cont.) The OS is responsible for controlling and managing the various resources of a computer system.The OS functions in the same way as an ordinary computer software, i.e., it is a program or suite of programs executed by the processorThe OS frequently relinquishes control of the processor and must depend on the processor to allow it to regain controlThe OS itself doesn’t do any “useful” work.
10 Ease of Evolution of an OS A major OS will evolve over time for a number of reasons:Hardware upgrades plus new types of hardwareNew services demanded by usersFixer – fix holes in OS
11 Evolution of OS (1) 1940-1950 No operating system Run as an open shop User signs up for certain time to use it
12 Evolution of OS (2) - Simple Batch Systems mid 1950s - mid 1960sUser no longer has direct access to the machineSubmit the job to an operator who batches the jobs together sequentially and places the entire batch on the input deviceOften jobs of a similar nature can be bundled together to further increase economyInterrupt ProcessingDevice DriversJob SequencingControl Language InterpreterUserProgramAreaMonitor
13 Evolution of OS (2) - Simple Batch Systems (cont.) Job Control Language (JCL)Special type of programming languageProvide instruction to the monitor$JOB user_spec ; identify the user for accounting purposes$FORTRAN ; load the FORTRAN compilersource program cards$LOAD ; load the compiled program$RUN ; run the programdata cards$EOJ ; end of job$JOB user_spec ; identify a new user$LOAD application$RUN data$EOJ
14 Evolution of OS (2) - Simple Batch Systems (cont.) Need additional hardware features to support the batch OS:Memory Protection – protect the OS from being wiped outTimer – prevent the job run infinitelyPrivileged Instructioncertain instruction can only be executed by OS, and not by user.I/O could only be performed in monitor (supervisor) mode,CPU runs in supervisor mode or user modeInterruptsearly models did not have this capability.Later models have.Make more efficient use of resourcesNote: Some memory is given to OS and some processor time is given to OS. Butwe are still better off because machine is a lot faster than human operation.
15 Evolution of OS (3) - Multiprogrammed Batch Systems Monitor(more like a operating system)User program 1User program 2User program 3User program 41960s - presentSeveral users are in memory at the same timeMatch I/O intensive job with CPU intensive jobImportant to have Interrupt-Driven I/O or DMA to support multiprogrammed batch system.
16 UniprogrammingProcessor must wait for I/O instruction to complete before preceding
17 MultiprogrammingWhen one job needs to wait for I/O, the processor can switch to the other job
19 Evolution of OS (4) - Time-Sharing Systems 1970s - presentTo support interactive computingIn a time-sharing system, multiple users simultaneously access the system through terminals, with the OS interleaving the execution of each user program in a short burst or quantum of computation.Context SwitchingA job (now often called process) can get “switched in” or “switched out”.OS should give the illusion for the process as if it exists in the CPU continuously
20 Batch Multiprogramming versus Time Sharing Principal objectiveMaximize processor useMinimize response timeSource of directives to operating systemJob control language commands provided with the jobCommands entered at the terminal
21 Evolution of OS (5) Real-time computer Execute programs that are guaranteed to have an upper bound on tasks that they carry out.e.g. guided missile systems, medical monitoring equipmentMultiprocessor – have more than one CPUShared memory multiprocessorsAccess the same memory - memory access must be synchronizedDistributed memory multiprocessorsEach CPU has its own associated memory – communication between processors is often slow and complicatedNetworked/Distributed Systems – consist of multiple computersNetworked systems: users are aware of the different computers that make up the systemDistributed systems: multiple computers are transparent to the user.