Process Scheduling
Process Scheduling
II. Preemptive scheduling is when a process transitions from a running state to a ready
state or from a waiting state to a ready state
*Preemptive Algorithms
Round Robin - RR
Shortest Remaining Time First - SRTF
Criteria in Choosing Algorithms
1. Increases CPU Utilization
2. Increases Throughput- Number of Outputs
3. Lower Turn Around Time
4. Lower waiting Time
5. Fairness and Quick Response Time
Sample Problem
Job At Bt Priority
A 0 13 4
B 3 5 3
C 8 4 5
D 15 6 1
E 17 9 2
Output Results Inputs Needed
0 3 8 15 17
Gannt Chart
A B C D E
0 13 18 22 28 37
A B C D E
% CPU Utilization = burst time x 100
end time
37 x 100 = 100%
37
tt = end time – at wt = tt – bt
ttA = 13 - 0 = 13 wtA = 13 – 13 = 0
ttB = 18 - 3 = 15 wtB = 15 – 5 = 10
ttC = 22 - 8 = 14 wtC = 14 – 4 = 10
ttD = 28 - 15 = 13 wtD = 13 – 6 = 7
ttE = 37 - 17 = 20 wtE = 20 – 9 = 11
ttAVE = 75 = 15 wtAVE = 38 = 7.6
5 5