# SimMemManager Script 4 # # Scheduling with two user processes and plentiful memory ########################################################################### # # Set up system: # page size: 100 # # frames: 100 # # vpages: 200 # frame factor: 50% # quantum: 3 # sysinit 100 100 200 0.5 3 # # The OS should be allocated the first 16 pages of virtual memory and # the first 16 frames of physical memory. Let's see: show pmt show fmt show vpage 0 show vpage 12 show frame 0 show frame 12 # # Queue up two arrivals: arrival 1000 1 25 10 MemAccess 1000 2 125 MemAccess 1000 4 250 MemAccess 1000 6 375 MemAccess 1000 8 425 MemAccess 1000 10 525 MemAccess 1000 12 175 MemAccess 1000 14 325 MemAccess 1000 16 625 MemAccess 1000 18 750 MemAccess 1000 20 825 # arrival 1001 2 25 10 MemAccess 1001 3 125 MemAccess 1001 5 250 MemAccess 1001 7 375 MemAccess 1001 9 425 MemAccess 1001 11 525 MemAccess 1001 13 175 MemAccess 1001 15 325 MemAccess 1001 17 625 MemAccess 1001 19 750 MemAccess 1001 21 825 # # Let's get both processes loaded: simto 4 show 1000 show 1001 show pmt show fmt # # Run through a few page faults for each process: simto 10 show show 1000 show 1001 # # And run through a few more. Process 1000 should reach its frame # allocation limit by time 18: simto 18 show show 1000 show 1001 # # The next page fault for process 1000 should trigger a page replacement: simto 22 show show 1000 show 1001 # # Now run for awhile and see what happens: simto 36 show show 1000 show 1001 show pmt show fmt # # Run a bit further. This should be interesting due to the fact that # some of the loaded pages have been re-hit, so the LRU page selection # should show up now in interesting ways. simto 44 show show 1000 show 1001 # # Run to termination: simto 53 show show 1000 show 1001 show pmt show fmt