The GATE Grind

GATE 2021 CS (CS1) – Question 35

Operating System · CPU and I/O Scheduling · 1 mark · Numerical answer

Three processes arrive at time zero with CPU bursts of 16, 20 and 10 milliseconds. If the scheduler has prior knowledge about the length of the CPU bursts, the minimum achievable average waiting time for these three processes in a non-preemptive scheduler (rounded to nearest integer) is ______ milliseconds.

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 12

Explanation

The scheduler knows the burst lengths, and without preemption the best average waiting time comes from **Shortest Job First**: run 10, then 16, then 20.

Process (burst)StartWaiting time
1000
161010
202626

Average waiting time $=\dfrac{0+10+26}{3}=\dfrac{36}3=\mathbf{12}$ ms.

More CPU and I/O Scheduling questions

All CPU and I/O Scheduling questions →