CS FundamentalsModerateGATE CS · Amazon/Microsoft SDE MCQ

Five batch jobs arrive together with run times 9, 6, 3, 5 and x, where x < 3. In what order should they run to minimise average turnaround time, and does the order depend on x?

  1. A. x, 3, 5, 6, 9 for every x < 3
  2. B. 9, 6, 5, 3, x, longest first
  3. C. x, 3, 5, 6, 9 only if x < 2
  4. D. Any order; the total is fixed

Correct answer: A. x, 3, 5, 6, 9 for every x < 3

Shortest-job-first minimises average turnaround when all jobs are present. For x < 3 the sorted order is x, 3, 5, 6, 9 regardless of x's exact value. The total is fixed, but the average depends on order.

More Operating Systems questions

Exams that ask this topic