next up previous contents Back to Operating Systems Home Page
Next: CPU scheduling in UNIX Up: Alternative scheduling methods Previous: Shortest process next (SPN)

Shortest remaining time next (SRTN)

This is a preemptive version of the previous one, in which the scheduler always dispatches that ready process which has the shortest expected remaining time to completion. The dispatching decison is always made when a new process is submitted: the currently running process has obviously a smaller remaining time than all other ready ones, otherwise it wouldn't have been dispatched. But a newly submitted job may have an even shorter one, in which case the currently running one would be blocked and put in ready state.

This decreases the average turnaround time with respect to SPN, since short, newly arrived processes are given immediate attention, if their expected completion time happens to be less than the remaining time to completion of the currently running and ready processes. As with SPN, there's a risk of starvation for long processes, in presence of a constat supply of short ones.

Since all preemption decision are made only either upon a new process submission or when a process completes, there's less overhead involved than with RR

Franco Callari