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