A CHAP7scheduling
A CHAP7scheduling
Basic Concepts
Scheduling Criteria
Scheduling Algorithms
Multiple-Processor Scheduling
Real-Time Scheduling
Algorithm Evaluation
P1 P2 P3
0 24 27 30
Waiting time for P1 = 0; P2 = 24; P3 = 27
Average waiting time: (0 + 24 + 27)/3 = 17
P2 P3 P1
0 3 6 30
0 3 7 8 12 16
P1 P2 P3 P2 P4 P1
0 2 4 5 7 11 16
n 1 tn 1 n .
P1 P2 P3 P4 P1 P3 P4 P1 P3 P3
CPU burst time indicates the time a process needs the CPU. Given
the following processes and burst times
Calculate the average wait time when each of the above
scheduling algorithms is used. Assume that a quantum of 6 is
being used. Which scheduling algorithm, as an operating systems
designer, would you implement and why
Three queues:
Q0 – time quantum 8 milliseconds
Q1 – time quantum 16 milliseconds
Q2 – FCFS
Scheduling
A new job enters queue Q0 which is served FCFS. When it
gains CPU, job receives 8 milliseconds. If it does not finish
in 8 milliseconds, job is moved to queue Q1.
At Q1 job is again served FCFS and receives 16 additional
milliseconds. If it still does not complete, it is preempted
and moved to queue Q2.