Question: Hello, Please explain this java code written for ''longest processing time scheduling in parallel machines'' step by step. I do not understand it so I
Hello, Please explain this java code written for ''longest processing time scheduling in parallel machines'' step by step. I do not understand it so I need help. Thank you.
public class LPT {
public static void main(String[] args) { int m = Integer.parseInt(args[0]); // number of machines
int n = StdIn.readInt(); Job[] jobs = new Job[n]; for (int i = 0; i < n; i++) { String name = StdIn.readString(); double time = StdIn.readDouble(); jobs[i] = new Job(name, time); }
// sort jobs in ascending order of processing time Arrays.sort(jobs);
// generate m empty processors and put on priority queue MinPQ
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
