(I) Pre-emptive priority
Gnat Chat
P1 P2 P1 P5 P1 P3 P4
0.0 2.0 3.0 7.0 12.0 16.0 18.0 19.0
Completion Turnaround Waiting
Process Burst Time Arrival Time Time Time Time
P1 10 0.0 16 16 6
P2 1 2.0 3 1 0
P3 2 4.0 18 14 12
P4 1 6.0 19 13 12
P5 5 7.0 12 5 0
Average WT: 6 + 12 + 12 = 30
30
=6
5
(II) Non-preemptive
Gnat Chat
P1 P2 P5 P3 P4
0.0 10.0 11.0 16.0 18.0 19.0
Burst Arrival Completion Turnaround Waiting
Process Time Time Time Time Time
P1 1O 0.0 10 10 0
P2 1 2.0 11 9 8
P3 2 4.0 18 14 12
P4 1 6.0 19 13 12
P5 5 7.0 16 9 4
Average WT: 8 + 12 + 12 + 4 = 36
36
=7.2
5
(III) First come first save
Gnat Chat
P1 P2 P3 P4 P5
0.0 10.0 11.0 13.0 14.0 19.0
Burst Arrival Completion Turnaround Waiting
Process Time Time Time Time Time
P1 1O 0.0 10 10 0
P2 1 2.0 11 9 8
P3 2 4.0 13 9 7
P4 1 6.0 14 8 7
P5 5 7.0 19 12 7
Average WT: 8 + 7+ 7+ 7 = 29
29
=5.8
5
(IV) Pre-emptive shortest job first
Gnat Chat
P1 P2 P1 P3 P4 P5 P1
0.0 2.0 3.0 4.0 6.0 7.0 12.0 19.0
Completion Turnaround Waiting
Process Burst Time Arrival Time Time Time Time
P1 10 0.0 19 19 9
P2 1 2.0 3 1 0
P3 2 4.0 6 2 0
P4 1 6.0 7 1 0
P5 5 7.0 12 5 0
9
Average WT: =1.8
5
(V) Round-Robin
Gnat Chat
P1 P2 P3 P4 P1 P5 P1 P5 P1
0.0 3.0 4.0 7.0 9.0 10.0 13.0 16.0 18.0 19.0
Burst Arrival Completion Turnaround Waiting
Process Time Time Time Time Time
P1 10 0.0 19 19 9
P2 1 2.0 4 2 1
P3 2 4.0 7 3 1
P4 1 6.0 9 3 2
P5 5 7.0 18 11 6
Average WT: 9 + 1 + 1 + 2 + 6 = 19
19
=3.8
5