Presentation is loading. Please wait.

Presentation is loading. Please wait.

Scheduling Chap 2. Scheduling Introduction to Scheduling (1) Bursts of CPU usage alternate with periods of I/O wait –a CPU-bound process –an I/O bound.

Similar presentations


Presentation on theme: "Scheduling Chap 2. Scheduling Introduction to Scheduling (1) Bursts of CPU usage alternate with periods of I/O wait –a CPU-bound process –an I/O bound."— Presentation transcript:

1 Scheduling Chap 2

2 Scheduling Introduction to Scheduling (1) Bursts of CPU usage alternate with periods of I/O wait –a CPU-bound process –an I/O bound process

3 Introduction to Scheduling Scheduling Algorithm Goals

4 Two Major Types Pre-emptive –O/S can remove a running process. –On the clock or Error Non Pre-Emptive –O/S can not remove a running process –Must complete or Block –DO_EVENTS()

5 Scheduling in Batch Systems An example of first come first served scheduling A arrives at zero and runs til 10. B arrives at one and needs 5 units. C arrives at two and needs 2 units. D arrivers at three and needs 1 unit. A finishes at 10, B at 15, C at 17 and D at 18. Average turnaround is? Average wait is ?

6 Scheduling in Batch Systems An example of shortest job first scheduling A arrives at zero and runs til 10. B arrives at one and needs 5 units. C arrives at two and needs 2 units. D arrivers at three and needs 1 unit. Time line is? Average turnaround is? Average wait is ?

7 Scheduling in Batch Systems An example of shortest time remaining scheduling A arrives at zero and runs til 10. B arrives at one and needs 5 units. C arrives at two and needs 2 units. D arrivers at three and needs 1 unit. Time line is? Average turnaround is? Average wait is ?

8 Scheduling in Batch Systems Three level scheduling

9 Scheduling in Interactive Systems Round Robin Scheduling –list of runnable processes –list of runnable processes after B uses up its quantum

10 Scheduling in Interactive Systems A scheduling algorithm with four priority classes

11 Honesty in Scheduling Who is the owner? Compute ratio –R = CPU units / CPU possible units Lying!

12 Scheduling in Real-Time Systems Schedulable real-time system Given –m periodic events –event i occurs within period P i and requires C i seconds Then the load can only be handled if

13 A problem Arrival Time0123 Process/JobABCD CPU units6314 Draw a time line for each process using FCFS, SJN, SRT, RR quanta of 2. Compute turnaround time and wait time for each process. Compute average turnaround and average wait for each method.


Download ppt "Scheduling Chap 2. Scheduling Introduction to Scheduling (1) Bursts of CPU usage alternate with periods of I/O wait –a CPU-bound process –an I/O bound."

Similar presentations


Ads by Google