From 6092dfca7954f9b21364b668fba9d8fa731d3c4f Mon Sep 17 00:00:00 2001 From: shivg7706 Date: Sat, 27 Oct 2018 08:29:09 +0530 Subject: [PATCH] added description about algorithm --- Others/SJF.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Others/SJF.java b/Others/SJF.java index 3bc510d6c..244365da4 100644 --- a/Others/SJF.java +++ b/Others/SJF.java @@ -1,3 +1,15 @@ +// Shortest job first. + +// Shortest job first (SJF) or shortest job next, is a scheduling policy +// that selects the waiting process with the smallest execution time to execute next +// Shortest Job first has the advantage of having minimum average waiting +// time among all scheduling algorithms. +// It is a Greedy Algorithm. +// It may cause starvation if shorter processes keep coming. +// This problem has been solved using the concept of aging. + + + import java.util.Scanner; import java.util.ArrayList; import java.util.Comparator;