Chapter 1 and 2 Computer System and Operating System Overview -The Evolution of Operating Systems OS Objectives and functions Instruction execution Interrupts The Memory Hierarchy Cache Memory 10 Communication Techniques 富
1 Chapter 1 and 2 Computer System and Operating System Overview –The Evolution of Operating Systems – OS Objectives and Functions – Instruction Execution – Interrupts – The Memory Hierarchy – Cache Memory – I/O Communication Techniques
Evolution of Operating Systems It may be easier to understand the key requirements of an os by considering the evolution of Operating systems Stages include Serial Processing Simple Batch Systems Multiprogrammed Batch Systems Time Sharing Systems
2 Evolution of Operating Systems • It may be easier to understand the key requirements of an OS by considering the evolution of Operating Systems • Stages include – Serial Processing – Simple Batch Systems – Multiprogrammed Batch Systems – Time Sharing Systems
Serial Processing (late 1940s to mid-1950s ° No operating system Machines run from a console with display lights, toggle switches, input device, and printer · Problems inc|ude: Scheduling using a hardcopy sign-up sheet Setup time loading complier and source program into memory saving the object program loading and linking object program and common functions 宰
3 Serial Processing (late 1940s to mid-1950s) • No operating system • Machines run from a console with display lights, toggle switches, input device, and printer • Problems include: – Scheduling using a hardcopy sign-up sheet – Setup time • loading complier and source program into memory • saving the object program • loading and linking object program and common functions
Simple Batch System (mid-1950s) Early computers were extremely expensIve Important to maximize processor utilization Monitor Software that controls the sequence of events Batch jobs together Program returns control to monitor when finished
4 Simple Batch System (mid-1950s) • Early computers were extremely expensive – Important to maximize processor utilization • Monitor – Software that controls the sequence of events – Batch jobs together – Program returns control to monitor when finished
Monitor's perspective Interrupt Monitor controls the processing Device vers sequence of events Monitor sequencing Resident monitor is software Control language Interpreter Boundary- always in memory Monitor reads in job and gIves control program Job returns control to monitor igure 2.3 Memory Layout for a Resident Monitor
5 Monitor’s perspective • Monitor controls the sequence of events • Resident Monitor is software always in memory • Monitor reads in job and gives control • Job returns control to monitor
Multiprogrammed Batch Systems CPU is often idle Even with automatic job sequencing 10 devices are slow compared to processor Read one record from file 15 uS Execute 100 instructions I us Write one record to file TOTAL 31s Percent CPU Utilization 1 =0.032=3.2% Figure 2.4 System Utilization Example 宰
6 Multiprogrammed Batch Systems • CPU is often idle – Even with automatic job sequencing. – I/O devices are slow compared to processor
Uniprogramming Processor must wait for l /o instruction to complete before preceding Program a Run Wait Run Wait Tim (a) Uniprogramming
7 Uniprogramming • Processor must wait for I/O instruction to complete before preceding
Multiprogramming When one job needs to wait for l/o, the processor can switch to the other job Program a R Wait Run Wait Program B Wait run Wait Run Wait RunRun Run Run Combined Wait Wait A B A B Time (b) Multiprogramming with two programs
8 Multiprogramming • When one job needs to wait for I/O, the processor can switch to the other job
Multiprogramming Program a Run Wait Wait Program B WaitRun Wait Run Wait Program c Wait Run Wait Run Wait RunRunRun RunRun Run Combined AB C Wait A B C Wait Time (c)Multiprogramming with three programs 宰
9 Multiprogramming
Time Sharing Systems (early 1960s Using multiprogramming to handle multiple interactive jobs Processor's time is shared among multiple users Multiple users simultaneously access the system through terminals 10
10 Time Sharing Systems (early 1960s) • Using multiprogramming to handle multiple interactive jobs • Processor’s time is shared among multiple users • Multiple users simultaneously access the system through terminals