Advertisement
Guest User

Untitled

a guest
Nov 25th, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. //Field
  2. final static String[] FILELOCS = { "processList" };
  3.  
  4.  
  5. public static void main(String[] args){
  6. //modify the parameters of the following statements to change the set of processes
  7. //File locations might have to be changed depending on the system that is used
  8.  
  9. runFCFS(FILELOCS[0]);
  10. runSJF(FILELOCS[0]);
  11. runSJR(FILELOCS[0]);
  12. runPriority(FILELOCS[0]);
  13. runRR(FILELOCS[0], 4); //The second number is the quantum
  14. runEDF(FILELOCS[0]);
  15. }
  16.  
  17.  
  18.  
  19. public static void runFCFS(String fileLoc){
  20. FCFSScheduler fcfs = new FCFSScheduler(System.getProperty("user.dir") + fileLoc);
  21. fcfs.run();
  22. }
  23. public static void runSJF(String fileLoc){
  24. SJFScheduler sjf = new SJFScheduler(System.getProperty("user.dir") + fileLoc);
  25. sjf.run();
  26. }
  27. public static void runSJR(String fileLoc){
  28. SJRScheduler sjr = new SJRScheduler(System.getProperty("user.dir") + fileLoc);
  29. sjr.run();
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement