Skip to content
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

added scheduling algorithm #599

Merged
merged 4 commits into from Oct 27, 2018
Merged

added scheduling algorithm #599

merged 4 commits into from Oct 27, 2018

Conversation

@shivg7706
Copy link
Contributor

@shivg7706 shivg7706 commented Oct 26, 2018

Scheduling Algorithm - Priority and Shortest job first which solves the starvation

@shivg7706
Copy link
Contributor Author

@shivg7706 shivg7706 commented Oct 27, 2018

@yanglbme Please review. Thanks

import java.util.ArrayList;
import java.util.Comparator;
import java.util.*;

This comment has been minimized.

@yanglbme

yanglbme Oct 27, 2018
Member

Hello, please add some descriptions about what the algorithm does. Thx

remainingProcess = new ArrayList<Process>();

gantChart = new ArrayList<Integer>();
arrivals = new HashMap<Integer, ArrayList<Process>>();

This comment has been minimized.

@yanglbme

yanglbme Oct 27, 2018
Member

We use Java 8, so you can simplify your code. Like this👇

gantChart = new ArrayList<>();
arrivals = new HashMap<>();
@shivg7706
Copy link
Contributor Author

@shivg7706 shivg7706 commented Oct 27, 2018

@yanglbme made changes as mentioned by you. please review thanks

Copy link
Member

@yanglbme yanglbme left a comment

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
 */
@shivg7706
Copy link
Contributor Author

@shivg7706 shivg7706 commented Oct 27, 2018

@yanglbme Please review.

@yanglbme yanglbme merged commit 2deeb8b into TheAlgorithms:master Oct 27, 2018
@shivg7706 shivg7706 deleted the shivg7706:scheduling branch Oct 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.