Pages

Search Tutorials

Saturday, 1 June 2013

C code for Shortest Remaining Time Scheduling

Shortest Remaining Time (SRT) Scheduling:
The shortest remaining time (SRT) policy is a preemptive version of shortest process next(SPN). In this case, the scheduler always chooses the process that has the shortest expected remaining processing time. When a new process joins the ready queue, it may in fact have a shorter remaining time than the currently running process. Accordingly, the scheduler may preempt the current process when a new process becomes ready. As with SPN, the scheduler must have an estimate of processing time to perform the selection function, and there is a risk of starvation of longer processes.