Presentation is loading. Please wait.

Presentation is loading. Please wait.

Process Scheduling ( 5.1-5.3) CPE 261403 - Operating Systems

Similar presentations


Presentation on theme: "Process Scheduling ( 5.1-5.3) CPE 261403 - Operating Systems"— Presentation transcript:

1 Process Scheduling ( 5.1-5.3) CPE 261403 - Operating Systems http://www.e-cpe.org/moodle

2 The Assumption that Makes Multiprogramming Work CPU-Bound Process I/O-Bound Process Figure 5.1

3 Process Scheduling Figure 3.6

4 Scheduling Circumstances (5.1.3) Figure 3.2

5 Scheduling Modes A B Non-Preemptive AB Preemptive A A B

6 Scheduling Modes: Nonpreemptive (Cooperative)

7 Scheduling Modes: Preemptive

8 Ever seen Windows 1.0?

9 Scheduling Criteria (5.2) CPU Utilization (Percent) Throughput (Processes per time unit) Turnaround time (time units) Waiting time (time units) Response time (time units)

10 Scheduling Algorithms (5.3)

11 First-Come, First-Serve (FCFS) ProcessBurst Time P 1 24 P 2 3 P 3 3 Waiting time for P 1 = 0; P 2 = 24; P 3 = 27 Average waiting time: (0 + 24 + 27)/3 = 17 P1P1 P2P2 P3P3 2427300

12 First-Come, First-Serve (FCFS) P2, P3, P1 P1P1 P3P3 P2P2 63300 Waiting time for P1 = 6; P2 = 0; P3 = 3 Average waiting time: (6 + 0 + 3)/3 = 3

13 Shortest-Job-First Scheduling (SJF) SJF is optimal – gives minimum average waiting time Two schemes:  Nonpreemptive  Preemptive (shortest-remaining-time-first)

14 Predicting CPU Burst Time Exponential Average

15 Prediction Example Figure 5.3 Prediction Actual


Download ppt "Process Scheduling ( 5.1-5.3) CPE 261403 - Operating Systems"

Similar presentations


Ads by Google