in Operating System edited by
625 views
0 votes
0 votes

 

Consider the following table of arrival time and burst time for three processes $\text{P0,P1 P2}$:

Process arrival time Burst time
$\text{P0}$ $0 \mathrm{~ms}$ $7$
$\text{P1}$ $1 \mathrm{~ms}$ $3$
$\text{P2}$ $2 \mathrm{~ms}$ $7$

 

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?

  1. $3 \mathrm{~ms}$
  2. $3.67 \mathrm{~ms}$
  3. $4.47 \mathrm{~ms}$
  4. $4 \mathrm{~ms}$
in Operating System edited by
by
625 views

1 Answer

0 votes
0 votes

Ans : Option B -> 3.67 ms

 

 P0  P1      P1              P0              P2

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

 

Related questions