CS FundamentalsHardProduct-company MCQ pattern

Processes: P1 (arrival 0, burst 7), P2 (arrival 2, burst 4), P3 (arrival 4, burst 1), P4 (arrival 5, burst 4) (ms). Using preemptive SJF (Shortest Remaining Time First), what is the average waiting time?

  1. A. 3.00 ms
  2. B. 4.00 ms
  3. C. 2.50 ms
  4. D. 7.00 ms

Correct answer: A. 3.00 ms

Gantt: P1 0–2, P2 2–4, P3 4–5, P2 5–7, P4 7–11, P1 11–16. Waiting = 9, 1, 0, 2 → 12/4 = 3 ms. 4 ms is the non-preemptive SJF answer; 7 ms is the average turnaround.

More Operating Systems questions

Exams that ask this topic