Download jar file from the link provided above and run it directly.
Linux :
Command line to download Chrome Web Browser :
sudo apt-get install chromium-browser
Command line to run jar file :
java -jar (filename).jar
Steps to use Simulator :
Consider the following example :
Step 1 : Download the jar file of the simulator from the link given above.
Step 2 : Once the jar file gets downloaded click to open it. The following window will appear.
Step 3 : This window contains many other sections which are Data, Job Pool, CPU, Ready Queue, Average(in sec) and Gantt Chart. They have their functionalities which will be discussed in next steps.
Step 4 : If user just wants to see the working of simulation, some of the inbuilt examples are already visible on the Job Pool table in the same window.
Step 5 : If the user wants to add his/her own data then click on "File" and then click on "Add my data" option in the header bar of the simulation.
Step 6 : When the user clicks on add my data, a new window appears with the help of which new entries for desired process can be added.
Step 7 : As per input table, if arrival time of Process ID 1 is not 0 sec, we keep our first job as a null job by keep all entries zero in that row.In that case, start filling entries in table from Process ID 2.
User also needs to enter the priority as per the scheduling algorithm. In this case, SJF means the priority will be as per the burst time of the processes. Arrival time 0 has priority 1 by default process P4. Then process P2 will have priority 2, process P5 will have priority 3, process P5 priority 4 and process P1.
If we click on "Load Default" button then we can get random input data entries in the table.
After filling the final table,we click on the "Load Button".
Note : If arrival time of Process ID 1 is 0, then the entries will be filled in following manner in the table:
Step 8 : If arrival time of Process ID 1 is not 0 (as given in above example), then data entered will be displayed in the Job Pool with change in Process ID mentioned in column marked #.
Note : If arrival time of Process ID 1 is 0, then data entered will be displayed in the Job Pool mentioned in column marked #.
Step 9 : Now we have to fill the required Data from Data section.
Dropdowns and Buttons are :
Num of Jobs : It is used to select the default number of jobs when input is not provided.User can select from 2 to 8 processes. It reflects in the Job Pool.
Algorithm : To select which Algorithm needs to be used (FCFS, SJF, Round Robin, Preemptive Priority, Non-Preemptive Priority, SRTF).
Sim Speed : To set simulation speed (Generally advisable to set it at 2 sec).
Quantum : Set to 2 by default.
Simulate : To start the simulation.
Next Step : To display simulation in Gantt Chart section step by step.
Restart : To restart the entire simulation.
Start another simulation : To start new simulation.
Finish : To display entire simulation of Gantt Chart in Gantt Chart section at once.
Step 10 : Simulation is shown in the Gantt Chart window as follows with respective Process ID written on them which is given in Job Pool.
Step 11 : This CPU window shows the Current Job at each step. It also shows Current Time from which second to which second is the CPU performing the task given and also the Utilization of the CPU in percentage.
Step 12 : The Ready Queue window shows the upcoming processes with their respective process id written on them.
Step 13 : The average waiting time and average turnaround time in seconds is shown in the following window.
# Priority for different scheduling algorithms is as follows:
In FCFS, ascending order with respect to arrival time.
In SJF, the arrival time 0 will have first priority and then give priority according to the burst time in ascending order. Less burst time, high priority.
In Round Robin, arrival time in ascending order.
Priorities in case of Preemptive Scheduling and Non-Preemptive Scheduling will be given in the question itself.