L-2.5: Shortest Remaining Time First (SJF With Preemption) Scheduling Algorithm with Example | OS

Gate Smashers10 minutes read

Shortest Remaining Time First (SRTF) is a pre-emptive scheduling algorithm where processes are executed based on their burst time, with a focus on selecting the shortest process at each interval. Arrival times, burst times, completion times, and response times are crucial factors in determining the efficiency of the SRTF algorithm.

Insights

  • SRTF (Shortest Remaining Time First) operates similarly to Shortest Job First with pre-emption, focusing on selecting processes with the shortest burst time at each interval, allowing for efficient execution.
  • Arrival times and burst times play a critical role in determining the order of execution in SRTF, with calculations of completion times, waiting times, and response times providing insights into the algorithm's efficiency through metrics like average turnaround time and average waiting time.

Get key ideas from YouTube videos. It’s free

Recent questions

  • What is the difference between SRTF and SJF?

    SRTF is SJF with pre-emption.

Related videos

Summary

00:00

Efficiency of SRTF Algorithm in Execution

  • Shortest remaining time first (SRTF) is the same as shortest job first with pre-emption.
  • In SRTF, the first criteria is burst time, and the mode is pre-emptive.
  • When only one process arrives, there is no competition, and that process can be executed.
  • In SRTF, processes are run in intervals to check for any shorter processes arriving in the ready queue.
  • The algorithm in SRTF involves selecting the process with the shortest burst time at each interval.
  • Arrival times and burst times are crucial in determining the order of execution in SRTF.
  • Completion times, waiting times, and response times are calculated based on the execution order in SRTF.
  • Average turnaround time, average waiting time, and average response time can be calculated to assess the efficiency of the SRTF algorithm.
Channel avatarChannel avatarChannel avatarChannel avatarChannel avatar

Try it yourself — It’s free.