Prashanth L.A.
2023-08-14
How should we develop a basic framework for thinking about scheduling policies?
What are the key assumptions?
What metrics are important?
What basic approaches have been used in the earliest of computer systems?
Each job runs for the same amount of time
All jobs arrive at the same time
All jobs only use the CPU (i.e., they perform no I/O)
The run-time of each job is known
\[ T_{turnaround}\ = T_{completion} − T_{arrival} \] All jobs arrive at the same time \(\Rightarrow\) \(T_{turnaround}\ =\)
SJF with Late Arrivals
Non-preemptive scheduler: run each job to completion
Preemptive scheduler: stop one process from running in order to run another
SJF is non-preemptive \(\Rightarrow\) late arrivals make it sub-optimal
Make SJF preemptive
\[ T_{response}\ = T_{firstrun} − T_{arrival} \]
The length of the time slice is critical
Should OS keep time slice very low?