Consider the following table of arrival time and burst time for three processes $\text{P0,P1 P2}$:
The pre-emptive shortest job first scheduling algorithm is used. Scheduling is carried out only at arrival or completion of a process. What is the average waiting time for the three processes?
Ans : Option B -> 3.67 ms
0 1 2 4 10 17
Waiting Time : P0 --> 0 + (4-1) = 3ms, P1 --> 0, P2 --> 10-2 = 8ms
Avg Waiting time = (3 + 8 )/3 = 11/3 = 3.67ms
64.3k questions
77.9k answers
244k comments
80.0k users