CPU Scheduling
CPU Scheduling
P1 P2 P3
0 24 27 30
Waiting time for P1 = 0; P2 = 24; P3 = 27
Average waiting time: (0 + 24 + 27)/3 = 17
0 3 6 30
0 3 7 8 12 16
P1 P2 P3 P2 P4 P1
0 2 4 5 7 11 16
P1 P2 P2 P4 P2 P5 P3 P1
0 2 4 6 8 12 16 28 42
FCFS + Preemption = RR
Performance
q large behaves similar to FCFS
q small more context switch overhead
quantum = 16
quantum = 8
Symmetric Approach:
Each processor examines the common ready queue
and selects a process to execute.
Several instances of STS will be running on different
processors, whenever necessary
Mutual exclusive access to the common queue???
Asymmetric Approach
One processor acts as scheduler (Master) for other
processor (Slaves)