Shortest job next

From Wikipedia, the free encyclopedia
Shortest job next being executed

Shortest job next (SJN), also known as shortest job first (SJF) or shortest process next (SPN), is a scheduling policy that selects for execution the waiting process with the smallest execution time.[1] SJN is a non-preemptive algorithm. Shortest remaining time is a preemptive variant of SJN.

Shortest job next is advantageous because of its simplicity and because it minimizes the average amount of time each process has to wait until its execution is complete. However, it has the potential for process starvation for processes which will require a long time to complete if short processes are continually added. Highest response ratio next is similar but provides a solution to this problem using a technique called aging.[2]

Another disadvantage of using shortest job next is that the total execution time of a job must be known before execution. While it is impossible to predict execution time perfectly, several methods can be used to estimate it, such as a weighted average of previous execution times.[3]

Shortest job next can be effectively used with interactive processes which generally follow a pattern of alternating between waiting for a command and executing it. If the execution burst of a process is regarded as a separate "job", past behaviour can indicate which process to run next, based on an estimate of its running time.

Shortest job next is used in specialized environments where accurate estimates of running time are available.

Weighted shortest job first

Weighted shortest job first (WSJF) is a modification of the concept used in agile development where jobs get weighted with the cost of delay so that the most costly jobs get done sooner.[4]

Value-flow rate (VFR) is an alternate, more intuitive name given to WSJF which expresses cost of delay and duration using unitless relative "points" rather than actual units of time or money.[5]

See also

References

  1. ^ Arpaci-Dusseau, Remzi H.; Arpaci-Dusseau, Andrea C. (2014), Operating Systems: Three Easy Pieces [Chapter Scheduling Introduction] (PDF), Arpaci-Dusseau Books 
  2. ^ Tanenbaum, A. S. (2008). Modern Operating Systems (3rd ed.). Pearson Education, Inc. p. 156. ISBN 0-13-600663-9. 
  3. ^ Silberschatz, A.; Galvin, P.B.; Gagne, G. (2005). Operating Systems Concepts (7th ed.). Wiley. p. 161. ISBN 0-471-69466-5. 
  4. ^ Reinertsen, Donald (2008). Principles of Product Development Flow: Second Generation Lean Product Development. Celeritas Publishing. p. 193. ISBN 978-1-935401-00-1. 
  5. ^ Knesek, Doug. "'Value-Flow Rate': A Better Name for a Great Measure". Retrieved April 8, 2016. 

External links

  • Shortest job first scheduling
Retrieved from "https://en.wikipedia.org/w/index.php?title=Shortest_job_next&oldid=770941095"
This content was retrieved from Wikipedia : http://en.wikipedia.org/wiki/Shortest_job_next
This page is based on the copyrighted Wikipedia article "Shortest job next"; it is used under the Creative Commons Attribution-ShareAlike 3.0 Unported License (CC-BY-SA). You may redistribute it, verbatim or modified, providing that you comply with the terms of the CC-BY-SA