Question discussion

Processes P1, P2, P3 and P4 arrive at times 0, 1, 2 and 3 with CPU bursts of 6, 3, 1 and 4 ms. Under preemptive SJF (SRTF), the average wai…

1384Medium DSSSB TGT Computer Science 0 replies

Processes P1, P2, P3 and P4 arrive at times 0, 1, 2 and 3 with CPU bursts of 6, 3, 1 and 4 ms. Under preemptive SJF (SRTF), the average waiting time is

  • A4.0 ms
  • B3.25 ms
  • C3.5 ms
  • D2.75 ms
Correct answer: D

Explanation

The order of execution is P1 (0–1), P2 (1–2), P3 (2–3), P2 (3–5), P4 (5–9), P1 (9–14), giving waiting times 8, 1, 0 and 2, i.e. 11/4 = 2.75 ms.

Discussion 0

Nobody has replied yet. Start the discussion!