Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Field
- final static String[] FILELOCS = { "processList" };
- public static void main(String[] args){
- //modify the parameters of the following statements to change the set of processes
- //File locations might have to be changed depending on the system that is used
- runFCFS(FILELOCS[0]);
- runSJF(FILELOCS[0]);
- runSJR(FILELOCS[0]);
- runPriority(FILELOCS[0]);
- runRR(FILELOCS[0], 4); //The second number is the quantum
- runEDF(FILELOCS[0]);
- }
- public static void runFCFS(String fileLoc){
- FCFSScheduler fcfs = new FCFSScheduler(System.getProperty("user.dir") + fileLoc);
- fcfs.run();
- }
- public static void runSJF(String fileLoc){
- SJFScheduler sjf = new SJFScheduler(System.getProperty("user.dir") + fileLoc);
- sjf.run();
- }
- public static void runSJR(String fileLoc){
- SJRScheduler sjr = new SJRScheduler(System.getProperty("user.dir") + fileLoc);
- sjr.run();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement