Three processes P1, P2 and P3 arrive at time 0 with CPU burst times of 6 ms, 2 ms and 4 ms, respectively. Under non-preemptive SJF scheduling, what is the average waiting time?

Options

  • A. 2 ms
  • B. 2.67 ms
  • C. 3.33 ms
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

B. 2.67 ms

Detailed Explanation

Explanation: SJF execution order is P2 (0–2), P3 (2–6), and P1 (6–12). Waiting times are P2 = 0 ms, P3 = 2 ms and P1 = 6 ms. Therefore, average waiting time = (0 + 2 + 6) / 3 = 2.67 ms.