SimScheduler by Bill McQuain Script file: Script2.txt Log file: Log2.txt Time: Wed Oct 19 20:49:12 2005 ---------------------------------------------------------- System initialized Total memory: 1024 Quantum: 3 ---------------------------------------------------------- Command: arrival 1000 1 10 128 Job 1000 added to pending queue ---------------------------------------------------------- Command: arrival 1001 2 5 64 Job 1001 added to pending queue ---------------------------------------------------------- Command: arrival 1002 3 5 32 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 512 10 0 1001 256 5 0 1002 128 5 0 1003 128 5 0 running holding ready blocked finished ---------------------------------------------------------- Command: simto 2 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 ---------------------------------------------------------- Command: show Scheduler system state: Total memory: 1024 Free memory: 192 Quantum: 3 System time: 2 Status PID Memory CPU Need CPU Time --------------------------------------------- pending 1002 128 5 0 1003 128 5 0 running 1000 512 10 1 holding ready 1001 256 5 0 blocked finished ---------------------------------------------------------- Command: simto 3 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 Moving process 1002 to ready state ---------------------------------------------------------- Command: show Scheduler system state: Total memory: 1024 Free memory: 64 Quantum: 3 System time: 3 Status PID Memory CPU Need CPU Time --------------------------------------------- pending 1003 128 5 0 running 1000 512 10 2 holding ready 1001 256 5 0 1002 128 5 0 blocked finished ---------------------------------------------------------- Command: simto 4 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 Selecting next process to run Moving process 1001 to running state ---------------------------------------------------------- Command: show Scheduler system state: Total memory: 1024 Free memory: 64 Quantum: 3 System time: 4 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running 1001 256 5 0 holding 1003 128 5 0 ready 1002 128 5 0 1000 512 10 3 blocked finished ---------------------------------------------------------- Command: simto 5 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 ---------------------------------------------------------- Command: show Scheduler system state: Total memory: 1024 Free memory: 64 Quantum: 3 System time: 5 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running 1001 256 5 1 holding 1003 128 5 0 ready 1002 128 5 0 1000 512 10 3 blocked finished ---------------------------------------------------------- Command: simto 6 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: 64 Quantum: 3 System time: 6 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running 1001 256 5 2 holding 1003 128 5 0 ready 1002 128 5 0 1000 512 10 3 blocked finished ---------------------------------------------------------- Command: simto 7 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 1002 to running state ---------------------------------------------------------- Command: show Scheduler system state: Total memory: 1024 Free memory: 64 Quantum: 3 System time: 7 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running 1002 128 5 0 holding 1003 128 5 0 ready 1000 512 10 3 1001 256 5 3 blocked finished ---------------------------------------------------------- Command: simto 8 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 ---------------------------------------------------------- Command: show Scheduler system state: Total memory: 1024 Free memory: 64 Quantum: 3 System time: 8 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running 1002 128 5 1 holding 1003 128 5 0 ready 1000 512 10 3 1001 256 5 3 blocked finished ---------------------------------------------------------- Command: simto 9 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: 64 Quantum: 3 System time: 9 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running 1002 128 5 2 holding 1003 128 5 0 ready 1000 512 10 3 1001 256 5 3 blocked finished ---------------------------------------------------------- Command: simto 10 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 1002 Checking blocked state for newly-satisfied processes Checking hold state for startable processes Selecting next process to run Moving process 1000 to running state ---------------------------------------------------------- Command: show Scheduler system state: Total memory: 1024 Free memory: 64 Quantum: 3 System time: 10 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running 1000 512 10 3 holding 1003 128 5 0 ready 1001 256 5 3 1002 128 5 3 blocked finished ---------------------------------------------------------- Command: simto 11 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 ---------------------------------------------------------- Command: show Scheduler system state: Total memory: 1024 Free memory: 64 Quantum: 3 System time: 11 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running 1000 512 10 4 holding 1003 128 5 0 ready 1001 256 5 3 1002 128 5 3 blocked finished ---------------------------------------------------------- Command: simto 12 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: 64 Quantum: 3 System time: 12 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running 1000 512 10 5 holding 1003 128 5 0 ready 1001 256 5 3 1002 128 5 3 blocked finished ---------------------------------------------------------- Command: simto 13 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 1000 Checking blocked state for newly-satisfied processes Checking hold state for startable processes Selecting next process to run Moving process 1001 to running state ---------------------------------------------------------- Command: show Scheduler system state: Total memory: 1024 Free memory: 64 Quantum: 3 System time: 13 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running 1001 256 5 3 holding 1003 128 5 0 ready 1002 128 5 3 1000 512 10 6 blocked finished ---------------------------------------------------------- Command: simto 14 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 ---------------------------------------------------------- Command: show Scheduler system state: Total memory: 1024 Free memory: 64 Quantum: 3 System time: 14 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running 1001 256 5 4 holding 1003 128 5 0 ready 1002 128 5 3 1000 512 10 6 blocked finished ---------------------------------------------------------- Command: simto 15 Advancing system time to 15 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 Moving process 1003 to ready state Selecting next process to run Moving process 1002 to running state ---------------------------------------------------------- Command: show Scheduler system state: Total memory: 1024 Free memory: 192 Quantum: 3 System time: 15 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running 1002 128 5 3 holding ready 1000 512 10 6 1003 128 5 0 blocked finished 1001 256 5 5 ---------------------------------------------------------- Command: simto 16 Advancing system time to 16 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: 192 Quantum: 3 System time: 16 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running 1002 128 5 4 holding ready 1000 512 10 6 1003 128 5 0 blocked finished 1001 256 5 5 ---------------------------------------------------------- Command: simto 17 Advancing system time to 17 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 Moving process 1000 to running state ---------------------------------------------------------- Command: show Scheduler system state: Total memory: 1024 Free memory: 320 Quantum: 3 System time: 17 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running 1000 512 10 6 holding ready 1003 128 5 0 blocked finished 1001 256 5 5 1002 128 5 5 ---------------------------------------------------------- Command: simto 20 Advancing system time to 18 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 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 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 ---------------------------------------------------------- Command: show Scheduler system state: Total memory: 1024 Free memory: 320 Quantum: 3 System time: 20 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running 1003 128 5 0 holding ready 1000 512 10 9 blocked finished 1001 256 5 5 1002 128 5 5 ---------------------------------------------------------- Command: simto 23 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 Checking blocked state for newly-satisfied processes Checking hold state for startable processes Advancing system time to 23 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 1000 to running state ---------------------------------------------------------- Command: show Scheduler system state: Total memory: 1024 Free memory: 320 Quantum: 3 System time: 23 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running 1000 512 10 9 holding ready 1003 128 5 3 blocked finished 1001 256 5 5 1002 128 5 5 ---------------------------------------------------------- Command: simto 26 Advancing system time to 24 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 Selecting next process to run Moving process 1003 to running state Advancing system time to 25 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 26 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 No eligible processes in system at this time ---------------------------------------------------------- Command: show Scheduler system state: Total memory: 1024 Free memory: 960 Quantum: 3 System time: 26 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running holding ready blocked finished 1001 256 5 5 1002 128 5 5 1000 512 10 10 1003 128 5 5 No more commands in script file. Exiting... ---------------------------------------------------------- Statistics for terminated processes: PID CPU Need Arrived Finished Wait time Turnaround Weighted ------------------------------------------------------------------- 1000 10 1 24 0 23 2.3 1001 5 2 15 2 13 2.6 1002 5 3 17 4 14 2.8 1003 5 4 26 5 11 2.2 Overall statistics: Average wait time: 2.8 Average turnaround time: 15.3 Average weighted turnaround: 2.5 ----------------------------------------------------------