Gate
Exam
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 4ms
P2 2 ms 9ms
The pre-emptive shortest job first scheduling algorithm is used. Scheduling is carried out only at arrival or completion of processes. What is the average waiting time for the three processes?
option
(A) 5.0 ms
(B) 4.33 ms
(C) 6.33 ms
(D) 7.33 ms
Read Solution (Total 1)
-
- P0 waits for 4ms as P1 is arrived after 1ms. P1 waits for 0ms as it arrives at 1ms and get allocated. P2 is allocated at 13ms but its waiting time is 11ms as it arrives at 2ms. So the waiting times:P0=4ms,P1=0ms,P2=11ms....Hence the average waiting time is:(0+4+11)/3=5ms.
- 10 years agoHelpfull: Yes(0) No(0)
Gate Other Question