| Full Form |
Shortest Job First (SJF) |
Shortest Remaining Job First (SRTF) |
| Type |
Non-preemptive |
Preemptive |
| Selection Criteria |
Selects the waiting process with the smallest execution time |
Selects the process with the smallest remaining time until completion |
| Alias |
Also known as Shortest Job Next (SJN) or Shortest Process Next (SPN) |
Preemptive SJF |
| Preemption |
Does not preempt a running process |
Preempts the running process if a new process with a shorter burst time arrives |
| Arrival Time Consideration |
Only considers the burst time of the processes |
Only consider the remaining time until the completion of the processes |
| Process Switching |
Occurs when a process completes its execution |
This may occur if a new process with a shorter burst time arrives |
| Waiting Time |
This can result in a longer average waiting time |
Generally results in shorter average waiting time due to frequent preemption |
| Turnaround Time |
This may lead to a higher average turnaround time |
Generally results in shorter average turnaround time due to frequent preemption |