-
Notifications
You must be signed in to change notification settings - Fork 19.9k
added scheduling algorithm #599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@yanglbme Please review. Thanks |
import java.util.ArrayList; | ||
import java.util.Comparator; | ||
import java.util.*; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, please add some descriptions about what the algorithm does. Thx
Others/SJF.java
Outdated
remainingProcess = new ArrayList<Process>(); | ||
|
||
gantChart = new ArrayList<Integer>(); | ||
arrivals = new HashMap<Integer, ArrayList<Process>>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use Java 8, so you can simplify your code. Like this👇
gantChart = new ArrayList<>();
arrivals = new HashMap<>();
@yanglbme made changes as mentioned by you. please review thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Java doc comments, please. See the following example:
/**
* Shortest job first.
*
* <p>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..........
*
* @author shivg7706
* @since 2018/10/27
*/
@yanglbme Please review. |
Scheduling Algorithm - Priority and Shortest job first which solves the starvation