CS FundamentalsHardGATE CS

Processes (arrival, burst): P1 (0, 3), P2 (1, 5), P3 (2, 2), P4 (4, 4). Which statement about the average waiting time is correct?

  1. A. SRTF gives a strictly smaller average than non-preemptive SJF
  2. B. Non-preemptive SJF and SRTF both give 2.5 ms, while FCFS gives 3.5 ms
  3. C. RR (q = 2) gives 2.5 ms, the same as SRTF
  4. D. FCFS gives 2.5 ms, the same as non-preemptive SJF

Correct answer: B. Non-preemptive SJF and SRTF both give 2.5 ms, while FCFS gives 3.5 ms

Computed averages: FCFS 3.5, SJF 2.5, SRTF 2.5, RR (q=2) 4.75. SRTF can never be worse than non-preemptive SJF, but here no arrival ever has a shorter burst than the remaining time of the running job, so it never preempts and both coincide.

More Operating Systems questions

Exams that ask this topic