PROCESS SCHEDULING
Experiment Number 2 : Shortest Job First
Theory :
Shortest job first (SJF) is a scheduling process that selects the waiting process with the smallest execution time to execute next. This scheduling method may or may not be preemptive. Significantly reduces the average waiting time for other processes waiting to be executed. The full form of SJF is Shortest Job First.
Characteristics of Shortest Job First :
Shortest Job first has the advantage of having a minimum average waiting time among all operating system scheduling algorithms.
It is associated with each task as a unit of time to complete.
It may cause starvation if shorter processes keep coming. This problem can be solved using the concept of ageing.
Advantages of Shortest Job First :
As SJF reduces the average waiting time thus, it is better than the first come first serve scheduling algorithm.
SJF is generally used for long term scheduling
Disadvantages of Shortest Job First :
One of the demerit SJF has is starvation.
Many times it becomes complicated to predict the length of the upcoming CPU request.