Longest Remaining Time First LRTF Scheduling Algorithm
For Complete YouTube Video: Click Here
In this class, we will try to understand Longest Remaining Time First LRTF Scheduling Algorithm.
In our previous classes, we discussed the concept of the Longest Job First and the Shortest Remaining Time First.
Longest Remaining Time First LRTF Scheduling Algorithm
In Longest Remaining Time First LRTF Scheduling Algorithm, the process with the longest remaining time will get selected for execution.
It is a preemptive algorithm. We will assume the time quantum as 1 unit in time.
To understand this, we will consider the example below.
At arrival time 0, we have only one process, P1, and it will get executed.
Process P1 will get executed for only one unit of time, so the burst time will get reduced by one.
At arrival time one, we have processes P1 and P2, remaining times 1 and 5.
The process P2 with the longest remaining time will get selected for execution.
At arrival time two, we have P1, P2, and P3 processes.
Among those, P2 will get executed.
For a detailed explanation, click the YouTube video link.