CPU Scheduling-1
CPU Scheduling-1
CPU Scheduling-1
order: P1 , P2 , P3
P1 P2 P3
The Gantt Chart for the schedule is:
0 24 27 30
Example FCFS
Covered in class
FCFS Scheduling (Cont.)
P2 P3 P1
0 3 6 30
0 3 9 16 24
0 1 6 16 18 19
P1 P2 P3 P1 P1 P1 P1 P1
0 4 7 10 14 18 22 26 30
Avg. TAT=
Example RR
Covered in class
Multilevel Queue
Process is assigned to one queue based on memory size,
priority, process type.
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
Multiple-Processor Scheduling