FOR FREE YEAR SOLVED

Longest Job First algorithm:

 

Longest Job First algorithm is just opposite to SJF because here Process having the longest burst time gets the Schedule first.

 

Criteria: Burst Time

Mode: Non Preemptive

Data Structure: Max Heap

 

 

Gantt Chart

 

 

Now we calculate Turn Around Time (TAT) and Waiting Time (WT) using the following formula:

 

TAT = CT - AT, WT = TAT – BT 

And 

Response Time (RT) = FR (First Response) - AR (Arrival Time)

 

 

 

Because it is non-preemptive scheduling, the response time and waiting time is same.