Skip to content

Commit 6092dfc

Browse files
committed
added description about algorithm
1 parent 7fc41e8 commit 6092dfc

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Others/SJF.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
113
import java.util.Scanner;
214
import java.util.ArrayList;
315
import java.util.Comparator;

0 commit comments

Comments
 (0)