Ticker

6/recent/ticker-posts

GATE|GATE-CS-2011

 

GATE|GATE-CS-2011|Question 65

Consider the following table of arrival time and burst time for three processes P0,P1,P2. 

Process

Arrival Time

Burst Time

P0

0ms

9ms

P1

1ms

4ms

P2

2ms

9ms

The pre-emptive shortest job first algorithm is used.Scheduling is carried out only at arrival or completion of processes.What is the average waiting time for the three processes? 

(A)5.0ms.

(B)4.33ms.

(C) 6.33ms.

(D)7.33 ms.

Answer: (A)

P0

P1

P0

P2

0               1                            5               13         22


Average waiting time

=W1+w2+w3/3

=(5-1)+0+(13-2)/3

=5.0ms

S0 option (A) is correct 5.0ms.

       





 

Post a Comment

0 Comments