InterviewSolution
| 1. |
What are the similarities and the differences between Shortest Job FIrst (SJF) and Shortest Remaining TIme FIrst (SRTF) CPU scheduling algorithms? |
||||||||||||
|
Answer» SJF (Shortest Job First) is a scheduling policy that prioritizes the waiting PROCESS with the shortest EXECUTION time. Shortest Job Next (SJN) or Shortest Process Next are other names for it (SPN). It is a scheduling algorithm that is not preemptive (that is, one process cannot SNATCH the resources assigned to a currently running process). The preemptive variant of SJF scheduling is the Shortest Remaining Time First (SRTF). The procedure, next in the queue, with the least amount of time till completion is chosen to be executed in this scheduling technique. Processes that arrive at the same time transform SRTF to SJF. Similarities:
|
|||||||||||||