SRTF
SRTF, or Shortest Remaining Time First, is a preemptive CPU scheduling algorithm used in operating systems. It is the preemptive variant of the Shortest Job First strategy. The scheduler always runs the ready process with the smallest remaining CPU burst time. If a new process arrives whose total burst time is shorter than the remaining time of the currently running process, the current process is preempted and the new process begins execution.
Implementation typically uses a priority queue or min-heap keyed by remaining burst time. Each arrival or completion
Advantages of SRTF include reduced average waiting time (and often reduced turnaround time) for workloads with
Disadvantages include potential starvation of long processes if many short jobs keep arriving, as well as the
Relation to other schedulers: SRTF is the preemptive counterpart to SJF. Unlike non-preemptive SJF, SRTF can
Notes: SRTF is commonly discussed in scheduling theory and education. In practical systems, exact burst times