Characteristics of Longest Remaining Time First (LRTF)

  • Among all the processes waiting in a waiting queue, CPU is always assigned to the process having largest burst time.
  • If two processes have the same burst time then the tie is broken using FCFS i.e. the process that arrived first is processed first. 
  • LJF CPU Scheduling can be of both preemptive and non-preemptive type.

Longest Remaining Time First (LRTF) or Preemptive Longest Job First CPU Scheduling Algorithm

Longest Remaining Time First (LRTF) is a preemptive version of Longest Job First (LJF) scheduling algorithm. In this scheduling algorithm, we find the process with the maximum remaining time and then process it, i.e. check for the maximum remaining time after some interval of time(say 1 unit each) to check if another process having more Burst Time arrived up to that time. 

Similar Reads

Characteristics of Longest Remaining Time First (LRTF)

Among all the processes waiting in a waiting queue, CPU is always assigned to the process having largest burst time. If two processes have the same burst time then the tie is broken using FCFS i.e. the process that arrived first is processed first.  LJF CPU Scheduling can be of both preemptive and non-preemptive type....

Advantages of Longest Remaining Time First (LRTF)

No other process can execute until the longest job or process executes completely. All the jobs or processes finishes at the same time approximately....

Disadvantages of Longest Remaining Time First (LRTF)

This algorithm gives very high average waiting time and average turn-around time for a given set of processes. This may lead to convoy effect. It may happen that a short process may never get executed and the system keeps on executing the longer processes. It reduces the processing speed and thus reduces the efficiency and utilization of the system....

Longest Remaining Time First (LRTF) CPU Scheduling Algorithm

Step-1: First, sort the processes in increasing order of their Arrival Time.  Step-2: Choose the process having least arrival time but with most Burst Time.  Step-3: Then process it for 1 unit. Check if any other process arrives upto that time of execution or not.  Step-4: Repeat the above both steps until execute all the processes....

Examples to show working of Preemptive Longest Job First CPU Scheduling Algorithm:

Example-1: Consider the following table of arrival time and burst time for four processes P1, P2, P3 and P4....