SimScheduler implementation by Bill McQuain Script file: LRU.txt # SimMemManager Script 2 # # Scheduling with one user process # - load of user process into VM # - load of 0-th page of user process into RM # - servicing page faults # - memory access commands # - LRU replacement ########################################################################### # # Set up system: # page size: 100 # # frames: 100 # # vpages: 200 # frame factor: 25% # quantum: 3 # Memory manager is trying to load process 9999 into VM process allocated 16 pages starting at VM page 0 9999 has requested process page 0 which is virtual page 0 giving this process a new frame will be loaded into real memory frame 0 9999 has requested process page 1 which is virtual page 1 giving this process a new frame will be loaded into real memory frame 1 9999 has requested process page 2 which is virtual page 2 giving this process a new frame will be loaded into real memory frame 2 9999 has requested process page 3 which is virtual page 3 giving this process a new frame will be loaded into real memory frame 3 9999 has requested process page 4 which is virtual page 4 giving this process a new frame will be loaded into real memory frame 4 9999 has requested process page 5 which is virtual page 5 giving this process a new frame will be loaded into real memory frame 5 9999 has requested process page 6 which is virtual page 6 giving this process a new frame will be loaded into real memory frame 6 9999 has requested process page 7 which is virtual page 7 giving this process a new frame will be loaded into real memory frame 7 9999 has requested process page 8 which is virtual page 8 giving this process a new frame will be loaded into real memory frame 8 9999 has requested process page 9 which is virtual page 9 giving this process a new frame will be loaded into real memory frame 9 9999 has requested process page 10 which is virtual page 10 giving this process a new frame will be loaded into real memory frame 10 9999 has requested process page 11 which is virtual page 11 giving this process a new frame will be loaded into real memory frame 11 9999 has requested process page 12 which is virtual page 12 giving this process a new frame will be loaded into real memory frame 12 9999 has requested process page 13 which is virtual page 13 giving this process a new frame will be loaded into real memory frame 13 9999 has requested process page 14 which is virtual page 14 giving this process a new frame will be loaded into real memory frame 14 9999 has requested process page 15 which is virtual page 15 giving this process a new frame will be loaded into real memory frame 15 Memory manager loaded OS: VM base page is: 0 VM size: 16 pages OS image loaded into real memory ---------------------------------------------------------- System initialized Real memory: 10000 bytes Virtual memory: 20000 bytes Page size: 100 bytes Quantum: 3 ---------------------------------------------------------- # # Queue up an arrival with enough memory reads to reach its frame limit: Command: arrival 1000 1 30 12 Job 1000 added to pending queue ---------------------------------------------------------- Command: MemAccess 1000 2 25 Added Read request (2, 25) for 1000 ---------------------------------------------------------- Command: MemAccess 1000 4 125 Added Read request (4, 125) for 1000 ---------------------------------------------------------- Command: MemAccess 1000 9 625 Added Read request (9, 625) for 1000 ---------------------------------------------------------- # # ... and some to scramble the LRU ordering: Command: MemAccess 1000 12 50 Added Read request (12, 50) for 1000 ---------------------------------------------------------- Command: MemAccess 1000 15 150 Added Read request (15, 150) for 1000 ---------------------------------------------------------- # # And go beyond that to force simple replacements: Command: MemAccess 1000 18 225 Added Read request (18, 225) for 1000 ---------------------------------------------------------- Command: MemAccess 1000 20 925 Added Read request (20, 925) for 1000 ---------------------------------------------------------- Command: MemAccess 1000 22 825 Added Read request (22, 825) for 1000 ---------------------------------------------------------- # # And finally a few more: Command: MemRead 1000 26 225 ---------------------------------------------------------- Command: MemRead 1000 28 925 ---------------------------------------------------------- # # Let's see if it reaches its frame limit at the right point: Command: simto 18 Advancing system time to 1 Notifying relevant processes of system tick Checking for new arrivals to hold queue Process 1000 entering hold state Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes Memory manager is trying to load process 1000 into VM process allocated 12 pages starting at VM page 16 Moving process 1000 to wait state 1000 has requested process page 0 which is virtual page 16 giving this process a new frame will be loaded into real memory frame 16 Selecting next process to run No eligible processes in system at this time Advancing system time to 2 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Selecting next process to run No eligible processes in system at this time Advancing system time to 3 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking wait state for serviced page faults Moving process 1000 to ready state Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Selecting next process to run Moving process 1000 to running state Advancing system time to 4 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Advancing system time to 5 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Process wants to access relative address 25 resolves to virtual page 16 and offset 25 page is resident, proceeding with access accessing frame 16 Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Advancing system time to 6 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 wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Selecting next process to run Moving process 1000 to running state Advancing system time to 7 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Process wants to access relative address 125 resolves to virtual page 17 and offset 25 page is not resident... initiating page fault Moving process 1000 to PFWait state 1000 has requested process page 1 which is virtual page 17 giving this process a new frame will be loaded into real memory frame 17 Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Selecting next process to run No eligible processes in system at this time Advancing system time to 8 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Selecting next process to run No eligible processes in system at this time Advancing system time to 9 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking wait state for serviced page faults Moving process 1000 to ready state Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Selecting next process to run Moving process 1000 to running state Advancing system time to 10 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process accessing frame 17 Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Advancing system time to 11 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Advancing system time to 12 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 wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Selecting next process to run Moving process 1000 to running state Advancing system time to 13 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Advancing system time to 14 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Process wants to access relative address 625 resolves to virtual page 22 and offset 25 page is not resident... initiating page fault Moving process 1000 to PFWait state 1000 has requested process page 6 which is virtual page 22 giving this process a new frame will be loaded into real memory frame 18 Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Selecting next process to run No eligible processes in system at this time Advancing system time to 15 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Selecting next process to run No eligible processes in system at this time Advancing system time to 16 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking wait state for serviced page faults Moving process 1000 to ready state Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists 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 accessing frame 18 Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Advancing system time to 18 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists ---------------------------------------------------------- Command: show Scheduler system state: Quantum: 3 System time: 18 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running 1000 12 30 11 holding ready PFWait IOWait finished ---------------------------------------------------------- Command: show 1000 PID: 1000 State: Running Memory: 12 V Base: 16 CPU need: 30 CPU time: 11 Page faults: 3 Pending I/O requests: none Pending Read requests: {(12, 50)(15, 150)(18, 225)(20, 925)(22, 825)} Pending Write requests: none Page map: Page Frame Resident 0 16 16 Y 1 17 17 Y 2 18 N 3 19 N 4 20 N 5 21 N 6 22 18 Y 7 23 N 8 24 N 9 25 N 10 26 N 11 27 N ---------------------------------------------------------- Command: show pmt Page Frame Resident 0 0 Y 1 1 Y 2 2 Y 3 3 Y 4 4 Y 5 5 Y 6 6 Y 7 7 Y 8 8 Y 9 9 Y 10 10 Y 11 11 Y 12 12 Y 13 13 Y 14 14 Y 15 15 Y 16 16 Y 17 17 Y 22 18 Y ---------------------------------------------------------- Command: show fmt Frame vPage Owner Allocated 0 0 9999 Y 1 1 9999 Y 2 2 9999 Y 3 3 9999 Y 4 4 9999 Y 5 5 9999 Y 6 6 9999 Y 7 7 9999 Y 8 8 9999 Y 9 9 9999 Y 10 10 9999 Y 11 11 9999 Y 12 12 9999 Y 13 13 9999 Y 14 14 9999 Y 15 15 9999 Y 16 16 1000 Y 17 17 1000 Y 18 22 1000 Y ---------------------------------------------------------- # # Now let's run through the hits on resident pages to scramble the LRU # ordering a bit: Command: simto 24 Advancing system time to 19 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Process wants to access relative address 50 resolves to virtual page 16 and offset 50 page is resident, proceeding with access accessing frame 16 Quantum has expired for process 1000 Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Selecting next process to run Moving process 1000 to running state Advancing system time to 20 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Advancing system time to 21 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Advancing system time to 22 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Process wants to access relative address 150 resolves to virtual page 17 and offset 50 page is resident, proceeding with access accessing frame 17 Quantum has expired for process 1000 Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Selecting next process to run Moving process 1000 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 wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Advancing system time to 24 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists ---------------------------------------------------------- Command: show 1000 PID: 1000 State: Running Memory: 12 V Base: 16 CPU need: 30 CPU time: 17 Page faults: 3 Pending I/O requests: none Pending Read requests: {(18, 225)(20, 925)(22, 825)} Pending Write requests: none Page map: Page Frame Resident 0 16 16 Y 1 17 17 Y 2 18 N 3 19 N 4 20 N 5 21 N 6 22 18 Y 7 23 N 8 24 N 9 25 N 10 26 N 11 27 N ---------------------------------------------------------- Command: show pmt Page Frame Resident 0 0 Y 1 1 Y 2 2 Y 3 3 Y 4 4 Y 5 5 Y 6 6 Y 7 7 Y 8 8 Y 9 9 Y 10 10 Y 11 11 Y 12 12 Y 13 13 Y 14 14 Y 15 15 Y 16 16 Y 17 17 Y 22 18 Y ---------------------------------------------------------- Command: show fmt Frame vPage Owner Allocated 0 0 9999 Y 1 1 9999 Y 2 2 9999 Y 3 3 9999 Y 4 4 9999 Y 5 5 9999 Y 6 6 9999 Y 7 7 9999 Y 8 8 9999 Y 9 9 9999 Y 10 10 9999 Y 11 11 9999 Y 12 12 9999 Y 13 13 9999 Y 14 14 9999 Y 15 15 9999 Y 16 16 1000 Y 17 17 1000 Y 18 22 1000 Y ---------------------------------------------------------- # # Now let's see some accesses that cause replacment of memory pages. First one: Command: simto 27 Advancing system time to 25 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Process wants to access relative address 225 resolves to virtual page 18 and offset 25 page is not resident... initiating page fault Moving process 1000 to PFWait state 1000 has requested process page 2 which is virtual page 18 re-using a frame already allocated to this process choosing frame 18 unloading page 22 will be loaded into real memory frame 18 Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Selecting next process to run No eligible processes in system at this time Advancing system time to 26 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Selecting next process to run No eligible processes in system at this time Advancing system time to 27 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking wait state for serviced page faults Moving process 1000 to ready state Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Selecting next process to run Moving process 1000 to running state ---------------------------------------------------------- Command: show Scheduler system state: Quantum: 3 System time: 27 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running 1000 12 30 18 holding ready PFWait IOWait finished ---------------------------------------------------------- Command: show 1000 PID: 1000 State: Running Memory: 12 V Base: 16 CPU need: 30 CPU time: 18 Page faults: 4 Pending I/O requests: none Pending Read requests: {(20, 925)(22, 825)} Pending Write requests: none Page map: Page Frame Resident 0 16 16 Y 1 17 17 Y 2 18 18 Y 3 19 N 4 20 N 5 21 N 6 22 N 7 23 N 8 24 N 9 25 N 10 26 N 11 27 N ---------------------------------------------------------- Command: show pmt Page Frame Resident 0 0 Y 1 1 Y 2 2 Y 3 3 Y 4 4 Y 5 5 Y 6 6 Y 7 7 Y 8 8 Y 9 9 Y 10 10 Y 11 11 Y 12 12 Y 13 13 Y 14 14 Y 15 15 Y 16 16 Y 17 17 Y 18 18 Y ---------------------------------------------------------- Command: show fmt Frame vPage Owner Allocated 0 0 9999 Y 1 1 9999 Y 2 2 9999 Y 3 3 9999 Y 4 4 9999 Y 5 5 9999 Y 6 6 9999 Y 7 7 9999 Y 8 8 9999 Y 9 9 9999 Y 10 10 9999 Y 11 11 9999 Y 12 12 9999 Y 13 13 9999 Y 14 14 9999 Y 15 15 9999 Y 16 16 1000 Y 17 17 1000 Y 18 18 1000 Y ---------------------------------------------------------- # ... and the second: Command: simto 31 Advancing system time to 28 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process accessing frame 18 Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Advancing system time to 29 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Process wants to access relative address 925 resolves to virtual page 25 and offset 25 page is not resident... initiating page fault Moving process 1000 to PFWait state 1000 has requested process page 9 which is virtual page 25 re-using a frame already allocated to this process choosing frame 16 unloading page 16 will be loaded into real memory frame 16 Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Selecting next process to run No eligible processes in system at this time Advancing system time to 30 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Selecting next process to run No eligible processes in system at this time Advancing system time to 31 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking wait state for serviced page faults Moving process 1000 to ready state Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Selecting next process to run Moving process 1000 to running state ---------------------------------------------------------- Command: show Scheduler system state: Quantum: 3 System time: 31 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running 1000 12 30 20 holding ready PFWait IOWait finished ---------------------------------------------------------- Command: show 1000 PID: 1000 State: Running Memory: 12 V Base: 16 CPU need: 30 CPU time: 20 Page faults: 5 Pending I/O requests: none Pending Read requests: {(22, 825)} Pending Write requests: none Page map: Page Frame Resident 0 16 N 1 17 17 Y 2 18 18 Y 3 19 N 4 20 N 5 21 N 6 22 N 7 23 N 8 24 N 9 25 16 Y 10 26 N 11 27 N ---------------------------------------------------------- Command: show pmt Page Frame Resident 0 0 Y 1 1 Y 2 2 Y 3 3 Y 4 4 Y 5 5 Y 6 6 Y 7 7 Y 8 8 Y 9 9 Y 10 10 Y 11 11 Y 12 12 Y 13 13 Y 14 14 Y 15 15 Y 17 17 Y 18 18 Y 25 16 Y ---------------------------------------------------------- Command: show fmt Frame vPage Owner Allocated 0 0 9999 Y 1 1 9999 Y 2 2 9999 Y 3 3 9999 Y 4 4 9999 Y 5 5 9999 Y 6 6 9999 Y 7 7 9999 Y 8 8 9999 Y 9 9 9999 Y 10 10 9999 Y 11 11 9999 Y 12 12 9999 Y 13 13 9999 Y 14 14 9999 Y 15 15 9999 Y 16 25 1000 Y 17 17 1000 Y 18 18 1000 Y ---------------------------------------------------------- # ... and the third: Command: simto 35 Advancing system time to 32 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process accessing frame 16 Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Advancing system time to 33 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Process wants to access relative address 825 resolves to virtual page 24 and offset 25 page is not resident... initiating page fault Moving process 1000 to PFWait state 1000 has requested process page 8 which is virtual page 24 re-using a frame already allocated to this process choosing frame 17 unloading page 17 will be loaded into real memory frame 17 Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Selecting next process to run No eligible processes in system at this time Advancing system time to 34 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Selecting next process to run No eligible processes in system at this time Advancing system time to 35 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking wait state for serviced page faults Moving process 1000 to ready state Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Selecting next process to run Moving process 1000 to running state ---------------------------------------------------------- Command: show Scheduler system state: Quantum: 3 System time: 35 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running 1000 12 30 22 holding ready PFWait IOWait finished ---------------------------------------------------------- Command: show 1000 PID: 1000 State: Running Memory: 12 V Base: 16 CPU need: 30 CPU time: 22 Page faults: 6 Pending I/O requests: none Pending Read requests: none Pending Write requests: none Page map: Page Frame Resident 0 16 N 1 17 N 2 18 18 Y 3 19 N 4 20 N 5 21 N 6 22 N 7 23 N 8 24 17 Y 9 25 16 Y 10 26 N 11 27 N ---------------------------------------------------------- Command: show pmt Page Frame Resident 0 0 Y 1 1 Y 2 2 Y 3 3 Y 4 4 Y 5 5 Y 6 6 Y 7 7 Y 8 8 Y 9 9 Y 10 10 Y 11 11 Y 12 12 Y 13 13 Y 14 14 Y 15 15 Y 18 18 Y 24 17 Y 25 16 Y ---------------------------------------------------------- Command: show fmt Frame vPage Owner Allocated 0 0 9999 Y 1 1 9999 Y 2 2 9999 Y 3 3 9999 Y 4 4 9999 Y 5 5 9999 Y 6 6 9999 Y 7 7 9999 Y 8 8 9999 Y 9 9 9999 Y 10 10 9999 Y 11 11 9999 Y 12 12 9999 Y 13 13 9999 Y 14 14 9999 Y 15 15 9999 Y 16 25 1000 Y 17 24 1000 Y 18 18 1000 Y ---------------------------------------------------------- # Run it almost to termination: Command: simto 43 Advancing system time to 36 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process accessing frame 17 Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Advancing system time to 37 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Advancing system time to 38 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 wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Selecting next process to run Moving process 1000 to running state Advancing system time to 39 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Advancing system time to 40 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Advancing system time to 41 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 wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Selecting next process to run Moving process 1000 to running state Advancing system time to 42 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Advancing system time to 43 Notifying relevant processes of system tick Checking for new arrivals to hold queue Checking status of running process Process 1000 has terminated Checking wait state for serviced page faults no such process exists Checking blocked state for newly-satisfied processes no such process exists Checking hold state for startable processes no such process exists Selecting next process to run No eligible processes in system at this time ---------------------------------------------------------- Command: show 1000 ---------------------------------------------------------- # # All done... Command: show Scheduler system state: Quantum: 3 System time: 43 Status PID Memory CPU Need CPU Time --------------------------------------------- pending running holding ready PFWait IOWait finished 1000 12 30 30 ---------------------------------------------------------- No more commands in script file. Exiting... ---------------------------------------------------------- Statistics for terminated processes: PID CPU Need Arrived Finished Wait time Turnaround Weighted Page Faults ---------------------------------------------------------------------------------- 1000 30 1 43 0 40 1.3 6/9(0.67) Overall statistics: Average wait time: 0.0 Average turnaround time: 40.0 Average weighted turnaround: 1.3 Page faults: 6/9(0.67) ----------------------------------------------------------