CPU scheduling policies like FCFS (first come first serve) ,SJF with preemptive as well as Non preemptive,Round Robin,Priority scheduling are implemented in Java language:
Instruction to run the below program in windows OS:
1.save the program as rectangle.java in bin folder of jdk.
2.compile the program using ” javac rectangle.java “in cmd prompt
3.run the file using appletviewer rectangle.java
4.give input values in cmd prompt and finally observe Gantt Chart
in appletviewer window.
INPUT is: rectangle.java :
/* Program starts here: */