Advantages of Longest Job First(LJF)

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

Longest Job First (LJF) CPU Scheduling Algorithm

Longest Job First (LJF) is a non-preemptive scheduling algorithm. This algorithm is based on the burst time of the processes. The processes are put into the ready queue based on their burst times i.e., in descending order of the burst times. As the name suggests this algorithm is based on the fact that the process with the largest burst time is processed first. The burst time of only those processes is considered that have arrived in the system until that time. Its preemptive version is called Longest Remaining Time First (LRTF) algorithm

 

Similar Reads

Characteristics of Longest Job First(Non-Preemptive)

Among all the processes waiting in a waiting queue, the CPU is always assigned to the process having the 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 types....

Advantages of Longest Job First(LJF)

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

Disadvantages of Longest Job First CPU Scheduling Algorithm

This algorithm gives a very high average waiting time and average turn-around time for a given set of processes. This may lead to a 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 Job First CPU Scheduling Algorithm

Step-1: First, sort the processes in increasing order of their Arrival Time.  Step 2: Choose the process having the highest Burst Time among all the processes that have arrived till that time.  Step 3: Then process it for its burst time. Check if any other process arrives until this process completes execution.  Step 4: Repeat the above three steps until all the processes are executed....

Contact Us