CS FundamentalsHardAmazon · Microsoft MCQ pattern

Processes: P1 (arrival 0, burst 7), P2 (arrival 2, burst 4), P3 (arrival 4, burst 1), P4 (arrival 5, burst 4) (ms). Round Robin with quantum 3 ms. A process arriving at the same instant a quantum expires joins the ready queue before the preempted process. What is the completion time of P2, and what is the average response time (first run − arrival)?

  1. A. P2 completes at 9; average response 1.50 ms
  2. B. P2 completes at 14; average response 2.75 ms
  3. C. P2 completes at 13; average response 2.75 ms
  4. D. P2 completes at 14; average response 3.00 ms

Correct answer: B. P2 completes at 14; average response 2.75 ms

Gantt: P1 0–3, P2 3–6, P1 6–9, P3 9–10, P4 10–13, P2 13–14, P1 14–15, P4 15–16. P3 and P4 arrive during P2's slice and join the queue behind P1, so P2's second turn comes only at 13. Response times 0, 1, 5, 5 → 11/4 = 2.75 ms.

More Operating Systems questions

Exams that ask this topic