CS FundamentalsHardProduct-company interview pattern

Processes (arrival, burst): P1 (0, 6), P2 (2, 2), P3 (3, 4), P4 (5, 1). Round Robin with quantum 2 is used; a newly arrived process joins the ready queue before a process whose quantum just expired. What is the average waiting time?

  1. A. 4
  2. B. 3
  3. C. 3.5
  4. D. 6.75

Correct answer: C. 3.5

Gantt: P1 0–2, P2 2–4, P1 4–6, P3 6–8, P4 8–9, P1 9–11, P3 11–13. Completions: P1 11, P2 4, P3 13, P4 9. Waiting = TAT − burst: 5, 0, 6, 3 → 14/4 = 3.5. 6.75 is the average turnaround time.

More Operating Systems questions

Exams that ask this topic