Shortest Remaining Time First. This should be added to the OS directory.
Description of the algorithm
The process, whose remaining run time is shortest, is served first. This is a preemptive version of SJF scheduling.
Decision Mode:
Preemptive: When a new process arrives, its total time is compared to the current process remaining run time. If the new job needs less time to finish than the current process, the current process is suspended and the new job is started.
Implementation :
This strategy can also be implemented by using the sorted FIFO queue.
All processes in a queue are sorted in ascending order on their remaining run time. When the CPU becomes free, a process from the first position in a queue is selected to run.
SRTF
Description of the algorithm The process, whose remaining run time is shortest, is served first. This is a preemptive version of SJF scheduling.