Machine-translated by Google. Questions are authored in English.
Top

Discussion

Three processes P, Q and R enter the ready queue simultaneously with the length of the cpu burst given in milliseconds as 20, 10 and 15 respectively. The wailing time for process R in case of shortest job first scheduling is :

  • A.20
  • B.25
  • C.10
  • D.15

Answer: C

The waiting time of R is 10 milliseconds.

Shortest job first runs the process with the shortest burst first. All three arrive together, so the order is Q (10), then R (15), then P (20):

\[ \begin{aligned} Q &: 0 \text{ to } 10 \\ R &: 10 \text{ to } 25 \\ P &: 25 \text{ to } 45 \end{aligned} \]

R waits while Q runs, so its waiting time (printed 'wailing time') is 10 ms. 25 is R's completion time, 15 its own burst, and 20 the burst of P.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.