Performance Analysis
At this point you should have working versions of several virtual memory page-replacement algorithms; specifically,
- FIFO (starter code)
- TLB-aware page replacement
- Random page replacement
- The Clock Algorithm (with page aging)
For each of these algorithms, collect some statistics about their performance, and compare their performance with the FIFO code you started with.
To run some versions of the code, you may need to use git to checkout the appropriate revision. You can find the commit id in GitHub by clicking on the commit and then clicking on the clipboard icon to copy the commit id, and then use the command:
$ git checkout commit-id
(Git will tell you that you are in a “detached HEAD” state, but that's okay for this purpose.)
You may also need to switch configurations using the steps outlined earlier in the assignment (e.g., to run random page replacement).
DANGER! Be careful when switching between branches or commits. You may want to edit performance.md inside GitHub or elsewhere, so you don't lose your work when switching branches.
Required Statistics to Collect
For each scheme, gather the statistics for running maze -s 271828 800 using the vm command at the top-level prompt of OS/161 and report them in performance.md in the handin directory. Because there can be some randomness involved, you should run each algorithm multiple times and report the average of the results.
(It's best to do each run in a fresh boot of OS/161 to reset the state of the system.)
You may find it helpful to make a spreadsheet in your favorite spreadsheet system (e.g., Google Sheets, Microsoft Excel, Apple's Numbers) to keep track of the results and calculate the averages. You can then copy the contents of your spreadsheet and paste it into the Markdown tables generator using the “File/Paste table data...” menu item on the page.
Comment on what you observe from your measurements.
Go the Extra Mile
Finally, we have an open-ended part. Go the extra mile in some way. Options include, but are not limited to
- Observing the effects of different page-age limits in the Clock Algorithm.
- Finding a different program to run that exercises the virtual-memory system in a different way (perhaps even write your own program or modify an existing one; you'll need to rerun the
./setupcommand to rebuild the OS/161 userland if you do). - Finding other statistics to collect and analyze.
(When logged in, completion status appears here.)