CPU Scheduling Simulation

  1. Download the simulator from link: http://siber.cankaya.edu.tr/OperatingSystems/week6l/ProcessCPUScheduling.tar.gz ProcessCPUScheduling.tar.gz.
  2. Unpack the simulator with the following command:
    tar zxvf ProcessCPUScheduling.tar.gz
    
  3. Run the simulator with the following command:
    cd ProcessCPUScheduling
    chmod +x runps
    ./runps
    
    Figure 1: Process Scheduling Simulator
    \includegraphics[width=100mm]{figures/process-scheduling-simulator.eps}
  4. First of all, read the psdoc.html file carefully. This file contains detailed information about running and modifying the parameters of the simulation.
  5. Each time you want to modify simulation parameters such as first arrival or CPU burst, you have to edit the myrun.run file and restart the simulator. The contents of myrun.run file look like this:
    name myrun
    comment This is a sample experimental run file
    algorithm SJF
    numprocs 5
    firstarrival 0.0
    interarrival constant 0.0
    duration constant 25.0
    cpuburst constant 5.0
    ioburst constant 1.0
    basepriority 1.0
    
  6. Each line in this file hold various parameters related to the simulation such as the algorithm used for the simulation, number of processes, CPU burst time, etc.
  7. After starting the simulator, click on the ``Run Experiment'' button. This will start the simulation.
  8. When the simulation is completed, click on the ``Draw Gannt Chart'' button. A new window will appear with a gannt chart representing how the processes were scheduled.
    Figure 2: Gannt chart for a sample run with 10 processes
    \includegraphics[width=100mm]{figures/sim-gannt.eps}
  9. In this graph, each horizontal line represent processes. Green parts represent READY state (waiting for its turn), red parts represent RUNNING state.
  10. Change the simulation parameters many times and observe how each change affect the simulation itself.
Cem Ozdogan 2010-04-10