There was an error while loading. Please reload this page.
1 parent 7fc41e8 commit 6092dfcCopy full SHA for 6092dfc
Others/SJF.java
@@ -1,3 +1,15 @@
1
+// Shortest job first.
2
+
3
+// Shortest job first (SJF) or shortest job next, is a scheduling policy
4
+// that selects the waiting process with the smallest execution time to execute next
5
+// Shortest Job first has the advantage of having minimum average waiting
6
+// time among all scheduling algorithms.
7
+// It is a Greedy Algorithm.
8
+// It may cause starvation if shorter processes keep coming.
9
+// This problem has been solved using the concept of aging.
10
11
12
13
import java.util.Scanner;
14
import java.util.ArrayList;
15
import java.util.Comparator;
0 commit comments