Oops! It appears that you have disabled your Javascript. In order for you to see this page as it is meant to appear, we ask that you please re-enable your Javascript!

Shortest Job First Scheduling SJF Process Scheduling in operating systems

Last modified on February 13th, 2019 at 5:45 pm

Shortest Job First Scheduling SJF Process Scheduling in operating systems

Process with less burst time will always execute first.

This is a non-preemptive scheduling algorithm so processes priority does not matter.

Preferred to minimize waiting time.

Better than First come first served scheduling.

Works only when processor know in advance that how much time every process will take to execute on CPU.

Not preferred for interactive systems because required CPU time is not already in knowledge.

Easy to implement in Batch systems because in batch systems CPU time is already known. 

ProcessBurst TimeArrival
P142nd
P223rd
P381st
P434th

 

P2P4P1P3
0              2                5                 9         17

 

ProcessWaiting Time
P15
P20
P39
P42

Average Wait Time: (0+2+5+9) / 4 = 4

How to calculate turn around time?

TurnAroundTime = BurstTime + WaitingTime.

Program of Shortest Job First Scheduling (SJF) in C Language

Prof. Fazal Rehman Shamil
Researcher, Publisher of International Journal Of Software Technology & Science ISSN: 2616-5325
Instructor, SEO Expert, Web Programmer and poet.
Feel free to contact.