B. Shortest Job First (SJF) Scheduling
The criteria of this algorithm are which process having the
smallest CPU burst, CPU is assigned to that process next.
If two process having the same CPU burst time FCFS is
used to break up the tie . SJF can be worked as preemptive
and non– preemptive in nature based on the arrival time
and burst time of the processes. SJF reduces average
waiting time of the processes as compared to FCFS. SJF
favors shorter processes over longer ones which is an
overhead as compared to FCFS. It selects the job with the
smallest burst time ensuing CPU availability for other
processes as soon as the current process reaches its
completion. This prevents smaller processes from
suffering behind larger processes in the ready queue for a
longer time.