In Data-processing, SJF is the acronym of Shortest Job First (โshorter process in firstโ). It indicates a method of scheduling process.
It is about a algorithm of scheduling, i.e. of a algorithm being used to choose which several processes will be treated in first by the Processeur. The choice is done according to the execution time estimated of the process. Thus, the ordonnancor will let pass initially shortest from the processes of the queue.
There exist two versions of this algorithm: a préemptive version , and a nonpréemptive version. In the latter, a process having taken control of CPU leaves it only once the finished gust.
The préemptive version, so called SRIF , Shortest Remaining Time First (โshorter time remaining in firstโ), is more flexible. If a process whose execution time is shorter than the remainder of the execution time of the process in the course of treatment enters the queue, then it will take its place. There is then a commutation of context, and the treatment of the stopped process will begin again later there or it had been left.
SJF proves one of the most profitable algorithms with regard to the reduction of the time spent in the queue of the processes. However it is seldom used in-outside specialized environments, because it on standby requires a precise evaluation of the execution time of all the processes of treatment.
Answered by
Sanjeev
, an ibibo Advisor,
at
3:41 PM on October 28, 2008