CS FundamentalsHardGATE CS

Round Robin with quantum 3 ms; processes (arrival, burst): P1 (0, 8), P2 (2, 5), P3 (4, 2), P4 (6, 4). A process arriving at the instant a quantum ends is queued ahead of the preempted process. What is the waiting time of P1?

  1. A. 12 ms
  2. B. 10 ms
  3. C. 13 ms
  4. D. 18 ms

Correct answer: B. 10 ms

Gantt chart: P1 0-3 | P2 3-6 | P1 6-9 | P3 9-11 | P4 11-14 | P2 14-16 | P1 16-18 | P4 18-19. P1 completes at 18, so its waiting time is 18 - 0 - 8 = 10 ms.

More Operating Systems questions

Exams that ask this topic