Skip to main content

Posts

Showing posts with the label SJF

Shortest Job First Scheduling using HEAP

// Input is from the file "input.txt" in the form (a1,t1),(a2,t2),(a3,t3)  (arrival time, time to complete ie, burst time) import java.io.*; import java.util.*; public class SJFHeap {     static class point {         double time;         double run;         int no;         double total;         point(int i, double a, double b) {             no = i;             time = a;             run = b;             total = 0;         }     }     static class MHeap {         private point[] Heap;         p...