CS FundamentalsHardGATE CS · Amazon/Microsoft SDE MCQ

Jobs A (6), B (2), C (8) and D (3) all arrive at time 0 in that order. What are the average waiting time under non-preemptive SJF and the average waiting time under Round Robin with quantum 2?

  1. A. 4.5 and 8
  2. B. 4.5 and 3
  3. C. 7.5 and 8
  4. D. 4.5 and 8.5

Correct answer: A. 4.5 and 8

SJF runs B, D, A, C, waiting 0, 2, 5, 11: average 4.5. RR(2): B ends at 4, D at 13, A at 15, C at 19, giving waits 9, 2, 11, 10 = 32 / 4 = 8. RR's average response time is only 3, which is its real advantage.

More Operating Systems questions

Exams that ask this topic