Consider the following table of arrival time and burst time for three processes P0, P1 and P2
Process
Arrival time
Burst time
P0
0 ms
9 ms
P1
1 ms
4 ms
P2
2 ms
9 ms
The pre-emptive shortest job first scheduling alogrithm is used. Scheduling is carried out only at arrival or completion of processes. What is the average waiting time for th three processes?
A
6.33 ms
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
7.33 ms
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
4.33 ms
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
5.0 ms
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
Open in App
Solution
The correct option is D 5.0 ms
Average waitin time =w1+w2+w33=(5−1)+0+(13−2)3
= 5.0 ms