SimScheduler by Bill McQuain Script file: Script3.txt Log file: Log3.txt Time: Wed Oct 19 20:49:19 2005 ---------------------------------------------------------- System initialized Total memory: 1024 Quantum: 3 ---------------------------------------------------------- Command: arrival 1000 1 8 64 Job 1000 added to pending queue ---------------------------------------------------------- Command: arrival 1001 2 8 64 Job 1001 added to pending queue ---------------------------------------------------------- Command: arrival 1002 3 8 128 Job 1002 added to pending queue ---------------------------------------------------------- Command: arrival 1003 4 5 32 Job 1003 added to pending queue ---------------------------------------------------------- Command: show Scheduler system state: Total memory: 1024 Free memory: 960 Quantum: 3 System time: 0 Status PID Memory CPU Need CPU Time --------------------------------------------- pending 1000 256 8 0 1001 256 8 0 1002 512 8 0 1003 128 5 0 running holding ready blocked finished ---------------------------------------------------------- Command: simto 3 Advancing system time to 1 Notifying relevant processes of system tick Checking for new arrivals to hold queue Process 1000 entering hold state Checking blocked state for newly-satisfied processes Checking hold state for startable processes Moving process 1000 to ready state Selecting next process to run Moving process 1000 to running state Advancing system time to 2 Notifying relevant processes of system tick Checking for new arrivals to hold queue Process 1001 entering hold state Checking status of running process Checking blocked state for newly-satisfied processes Checking hold state for startable processes Moving process 1001 to ready state Advancing system time to 3 Notifying relevant processes of system tick Checking for new arrivals to hold queue Process 1002 entering hold state Checking status of running process Checking blocked state for newly-satisfied processes Checking hold state for startable processes ---------------------------------------------------------- Command: show Scheduler system state: Total memory: 1024 Free memory: 448 Quantum: 3 System time: 3 Status PID Memory CPU Need CPU Time --------------------------------------------- pending 1003 128 5 0 running 1000 256 8 2 holding 1002 512 8 0 ready 1001 256 8 0 blocked finished ---------------------------------------------------------- Command: simto 6 Advancing system time to 4 Notifying relevant processes of system tick Checking for new arrivals to hold queue Process 1003 entering hold state Checking status of running process Quantum has expired for process 1000 Checking blocked state for newly-satisfied processes Checking hold state for startable processes Moving process 1003 to ready state Selecting next process to run Moving process 1001 to running state Advancing system time to 5 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking blocked state for newly-satisfied processes Checking hold state for startable processes Advancing system time to 6 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking blocked state for newly-satisfied processes Checking hold state for startable processes ---------------------------------------------------------- Command: show Scheduler system state: Total memory: 1024 Free memory: 320 Quantum: 3 System time: 6 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running 1001 256 8 2 holding 1002 512 8 0 ready 1000 256 8 3 1003 128 5 0 blocked finished ---------------------------------------------------------- Command: simto 9 Advancing system time to 7 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Quantum has expired for process 1001 Checking blocked state for newly-satisfied processes Checking hold state for startable processes Selecting next process to run Moving process 1000 to running state Advancing system time to 8 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking blocked state for newly-satisfied processes Checking hold state for startable processes Advancing system time to 9 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking blocked state for newly-satisfied processes Checking hold state for startable processes ---------------------------------------------------------- Command: show Scheduler system state: Total memory: 1024 Free memory: 320 Quantum: 3 System time: 9 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running 1000 256 8 5 holding 1002 512 8 0 ready 1003 128 5 0 1001 256 8 3 blocked finished ---------------------------------------------------------- Command: simto 12 Advancing system time to 10 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Quantum has expired for process 1000 Checking blocked state for newly-satisfied processes Checking hold state for startable processes Selecting next process to run Moving process 1003 to running state Advancing system time to 11 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking blocked state for newly-satisfied processes Checking hold state for startable processes Advancing system time to 12 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking blocked state for newly-satisfied processes Checking hold state for startable processes ---------------------------------------------------------- Command: show Scheduler system state: Total memory: 1024 Free memory: 320 Quantum: 3 System time: 12 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running 1003 128 5 2 holding 1002 512 8 0 ready 1001 256 8 3 1000 256 8 6 blocked finished ---------------------------------------------------------- Command: simto 15 Advancing system time to 13 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Quantum has expired for process 1003 Checking blocked state for newly-satisfied processes Checking hold state for startable processes Selecting next process to run Moving process 1001 to running state Advancing system time to 14 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking blocked state for newly-satisfied processes Checking hold state for startable processes Advancing system time to 15 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking blocked state for newly-satisfied processes Checking hold state for startable processes ---------------------------------------------------------- Command: show Scheduler system state: Total memory: 1024 Free memory: 320 Quantum: 3 System time: 15 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running 1001 256 8 5 holding 1002 512 8 0 ready 1000 256 8 6 1003 128 5 3 blocked finished ---------------------------------------------------------- Command: simto 18 Advancing system time to 16 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Quantum has expired for process 1001 Checking blocked state for newly-satisfied processes Checking hold state for startable processes Selecting next process to run Moving process 1000 to running state Advancing system time to 17 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking blocked state for newly-satisfied processes Checking hold state for startable processes Advancing system time to 18 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Process 1000 has terminated Checking blocked state for newly-satisfied processes Checking hold state for startable processes Moving process 1002 to ready state Selecting next process to run Moving process 1003 to running state ---------------------------------------------------------- Command: show Scheduler system state: Total memory: 1024 Free memory: 64 Quantum: 3 System time: 18 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running 1003 128 5 3 holding ready 1001 256 8 6 1002 512 8 0 blocked finished 1000 256 8 8 ---------------------------------------------------------- Command: simto 30 Advancing system time to 19 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking blocked state for newly-satisfied processes Checking hold state for startable processes Advancing system time to 20 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Process 1003 has terminated Checking blocked state for newly-satisfied processes Checking hold state for startable processes Selecting next process to run Moving process 1001 to running state Advancing system time to 21 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking blocked state for newly-satisfied processes Checking hold state for startable processes Advancing system time to 22 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Process 1001 has terminated Checking blocked state for newly-satisfied processes Checking hold state for startable processes Selecting next process to run Moving process 1002 to running state Advancing system time to 23 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking blocked state for newly-satisfied processes Checking hold state for startable processes Advancing system time to 24 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking blocked state for newly-satisfied processes Checking hold state for startable processes Advancing system time to 25 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Quantum has expired for process 1002 Checking blocked state for newly-satisfied processes Checking hold state for startable processes Selecting next process to run Moving process 1002 to running state Advancing system time to 26 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking blocked state for newly-satisfied processes Checking hold state for startable processes Advancing system time to 27 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking blocked state for newly-satisfied processes Checking hold state for startable processes Advancing system time to 28 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Quantum has expired for process 1002 Checking blocked state for newly-satisfied processes Checking hold state for startable processes Selecting next process to run Moving process 1002 to running state Advancing system time to 29 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking blocked state for newly-satisfied processes Checking hold state for startable processes Advancing system time to 30 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Process 1002 has terminated Checking blocked state for newly-satisfied processes Checking hold state for startable processes Selecting next process to run No eligible processes in system at this time ---------------------------------------------------------- Command: show Scheduler system state: Total memory: 1024 Free memory: 960 Quantum: 3 System time: 30 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running holding ready blocked finished 1000 256 8 8 1003 128 5 5 1001 256 8 8 1002 512 8 8 No more commands in script file. Exiting... ---------------------------------------------------------- Statistics for terminated processes: PID CPU Need Arrived Finished Wait time Turnaround Weighted ------------------------------------------------------------------- 1000 8 1 18 0 17 2.1 1001 8 2 22 2 20 2.5 1002 8 3 30 4 12 1.5 1003 5 4 20 6 16 3.2 Overall statistics: Average wait time: 3.0 Average turnaround time: 16.3 Average weighted turnaround: 2.3 ----------------------------------------------------------