Question:medium

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 \(\underline{\hspace{2cm}}\) milliseconds.

Show Hint

Shortest Job First (SJF) scheduling always gives the minimum average waiting time when burst times are known.
Updated On: Jan 30, 2026
Show Solution

Correct Answer: 12

Solution and Explanation

Step 1: Choose the appropriate scheduling policy.
When the CPU burst times of processes are known beforehand, the Shortest Job First (SJF) scheduling algorithm gives the minimum average waiting time.


Step 2: Arrange processes by increasing burst time.
The given CPU burst times, arranged in ascending order, are:

10 ms, 16 ms, 20 ms


Step 3: Compute individual waiting times.

• Process with 10 ms burst time: waiting time = 0 ms
• Process with 16 ms burst time: waiting time = 10 ms
• Process with 20 ms burst time: waiting time = 10 + 16 = 26 ms


Step 4: Calculate the average waiting time.

Average waiting time = (0 + 10 + 26) / 3 = 36 / 3 = 12 ms


Final Answer:
12

Was this answer helpful?
0