Question discussion

Four processes arrive in a system with (arrival time, burst time) in ms as P1 (0, 7), P2 (2, 4), P3 (4, 1) and P4 (5, 4). What is the avera…

977Medium DSSSB TGT Computer Science 0 replies

Four processes arrive in a system with (arrival time, burst time) in ms as P1 (0, 7), P2 (2, 4), P3 (4, 1) and P4 (5, 4). What is the average waiting time under preemptive SJF (SRTF) scheduling?

  • A3 ms
  • B2 ms
  • C4 ms
  • D5 ms
Correct answer: A

Explanation

SRTF runs P1 0–2, P2 2–4, P3 4–5, P2 5–7, P4 7–11, P1 11–16; waiting times are 9, 1, 0 and 2, so the average is 12/4 = 3 ms.

Discussion 0

Nobody has replied yet. Start the discussion!