From 1e27a5d0b1e8329aa45470085f680c2e42ecef88 Mon Sep 17 00:00:00 2001 From: shivg7706 Date: Sat, 27 Oct 2018 12:59:00 +0530 Subject: [PATCH] documentation --- Others/SJF.java | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/Others/SJF.java b/Others/SJF.java index 244365da4..923ece654 100644 --- a/Others/SJF.java +++ b/Others/SJF.java @@ -1,14 +1,14 @@ -// 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. - - +/** +*

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.

+* @author shivg7706 +* @since 2018/10/27 +*/ import java.util.Scanner; import java.util.ArrayList; @@ -26,7 +26,6 @@ class Process { public int remainingTime; } - class Schedule { private int noOfProcess;