The sequence __________ is an optimal non-preemptive scheduling sequence for the following jobs which leaves the CPU idle for ________ unit(s) of time.
View worked solution
Answer: A
An optimal scheduling sequence is one that minimizes the average turnaround time (TAT). Let's compare the two main non-preemptive scheduling strategies:
Strategy 1: Schedule immediately at (No Idle Time)
Since Job 1 is the only job available at , it must run first. After Job 1 finishes at , we schedule the remaining jobs using Shortest Job First (SJF): Job 3, then Job 2.
- Execution sequence:
- Completion times: , ,
- Turnaround times (): , ,
- Average TAT = units
- CPU Idle Time = units
Strategy 2: Keep the CPU idle to run shorter jobs first (SJF with Idle Time)
If we keep the CPU idle from to to wait for all jobs to arrive, we can execute them in the optimal SJF order: Job 3, then Job 2, then Job 1.
- Execution sequence:
- Completion times: , ,
- Turnaround times (): , ,
- Average TAT = units
- CPU Idle Time = unit (from to )
Since Strategy 2 yields a significantly lower average turnaround time (), the optimal sequence is with unit of CPU idle time.
Free practice · Your answers on this page are not saved.
