Consider the following workload:
Process | Burst Time | Priority | Arrival time |
P1 | 50 ms | 4 | 0 ms |
P2 | 20 ms | 1 | 20 ms |
P3 | 100 ms | 3 | 40 ms |
P4 | 40 ms | 3 | 60 ms |
P1 | P1 | P1 | P1 | P1 | P2 | P2 | P3 | P3 | P3 | P3 | P3 | P3 | P3 | P3 | P3 | P3 | P4 | P4 | P4 | P4 |
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
Show that, among nonpreemptive scheduling algorithms, SPN provides the minimum average waiting time for a batch of jobs that arrive at the same time. Assume that the scheduler must always execute a task if one is available.