Consider an arbitrary set of CPU-bound processes with unequal CPU burst lengths submitted at the same time to a computer system. Which one of the following process scheduling algorithms would minimize the average waiting time in the ready queue?
View worked solution
Answer: A
To minimize the average waiting time in the ready queue for a set of processes, the optimal scheduling algorithm is Shortest Job First (SJF).
Let's analyze the given scenario:
- All processes are submitted at the same time (). Since there are no future arrivals, no preemption will actually take place after a process starts execution.
- Under these conditions, Shortest Remaining Time First (SRTF) (which is the preemptive version of SJF) behaves exactly like non-preemptive SJF.
- SJF is provably optimal for minimizing average waiting time because scheduling shorter jobs first reduces the waiting time of all subsequent jobs by the maximum possible amount.
Why other options are incorrect:
- Option B (Round-robin): Frequent context switching and sharing CPU time among all processes increases the average waiting and turnaround times compared to SJF.
- Option C (Uniform random): Randomly selecting processes does not leverage burst time information, leading to a sub-optimal average waiting time.
- Option D (Highest priority first with priority proportional to CPU burst length): If priority is proportional to the burst length, longer processes run first (Longest Job First), which actually maximizes the average waiting time.
Therefore, Shortest remaining time first minimizes the average waiting time.
Free practice · Your answers on this page are not saved.
