1、First-Come,First-Served Scheduling
Process Burst Time
P1 6
P2 4
P3 7
P4 2
P5 3
0 6 10 17 19 22
Average waiting time = (0+6+10+17+19)/5=10.4 milliseconds
2、Shortest-Job-First Scheduling
Process Burst Time
P1 6
P2 4
P3 7
P4 2
P5 3
0 2 5 9 15 22
Average waiting time = (0+2+5+9+15)/5=6.2 milliseconds
3、Shortest-Remaining-Time-First Scheduling
Process Burst Time Arrival Time
P1 6 0
P2 4 1
P3 7 3
P4 2 6
P5 3 7
0 1 5 6 8 11 15 22
Average waiting time = (9+0+12+0+1)/5 = 4.4 milliseconds
4、Priority Scheduling
Process Burst Time Priority
P1 6 2
P2 4 1
P3 7 3
P4 2 3
P5 3 4
0 4 10 17 19 22
Average waiting time = (4+0+10+17+19)/5 = 10 milliseconds
5、Round-Robin Scheduling
Process Burst Time
P1 6
P2 4
P3 7
P4 2
P5 3
Use a time quantum of 2 milliseconds
P1 |
P2 |
P3 |
P4 |
P5 |
P1 |
P2 |
P3 |
P5 |
P1 |
P3 |
0 2 4 6 8 10 12 14 16 17 19 22
Average waiting time = (13+10+15+6+14)/5 = 11.6 milliseconds