For the processes listed in the following table, which of the following scheduling schemes will give the lowest average turnaround time?
View worked solution
Answer: C
Theoretically, Shortest Remaining Time First (SRTF) (preemptive SJF) is optimal and always yields the minimum average turnaround time (and average waiting time) for any given set of processes. Let us verify this by calculating the Turnaround Time () for each scheduling scheme.
1. Shortest Remaining Time First (SRTF):
- At : Process runs.
- At : arrives. Remaining time of is , which is less than 's burst . continues.
- At : completes. . starts running.
- At : arrives (burst ). Remaining time of is . Since , preempts .
- At : arrives (burst ). Remaining time of is . Since and both have remaining time , we can run (or continue ). Let's run .
- At : completes. . resumes.
- At : completes. . resumes.
- At : completes. .
Calculating TAT for SRTF:
- Average TAT =
2. Non-preemptive SJF:
- runs from to ().
- runs from to ().
- runs from to ().
- runs from to ().
- Average TAT =
3. First Come First Serve (FCFS):
- runs to (), runs to (), runs to (), runs to ().
- Average TAT =
Thus, Shortest Remaining Time First (SRTF) gives the lowest average turnaround time.
Free practice · Your answers on this page are not saved.
