CS FundamentalsModerateGATE CS · Amazon/Microsoft SDE MCQ

Non-preemptive SJF; processes (arrival, burst): P1 (0, 3), P2 (5, 6), P3 (6, 2), P4 (7, 1), P5 (8, 4). The CPU idles when nothing is ready. What is the average turnaround time?

  1. A. 5.0
  2. B. 6.6
  3. C. 6.4
  4. D. 3.2

Correct answer: C. 6.4

P1 0-3, idle 3-5, P2 5-11 (only job ready at 5, not preempted), then P4 11-12, P3 12-14, P5 14-18: turnarounds 3, 6, 8, 5, 10, average 6.4. Preemptive SRTF gives 5.0, FCFS 6.6, and 3.2 is the average waiting time.

More Operating Systems questions

Exams that ask this topic