|
CSE Home | About Us | Search | Contact Info |
|
Project 2 - Virtual Memory Trace AnalysisNote: The due date for the experiment description has been changed to Wednesday, April 21 OutlineOut: Monday, April 12, 2004Experiment Description Due: Wednesday, April 21, 2004 Project Due: Monday, April 26, 2004 Project 2 is to be done individually. Tasks:
Assignment Goals
BackgroundWe have studied a wide range of page replacement algorithms in class, and discussed their relative advantages and disadvantages in a rather abstract setting. However, we have not discussed whether they work as expected in practice, on real applications.We have similarly discussed other parameters of VM systems - page size, number of physical pages, the application's locality - but, again, have not presented evidence that our theoretical analysis holds in practice. This assignment seeks to explore, using real data collected by Dennis Lee, a graduate of the department. The data was collected using Etch, a tool for instrumenting Windows NT applications. Etch produces trace files that, for our purposes, list every virtual address referenced (be it an instruction fetch, a load, or a store) that the program made during execution. Note that these files (like the applications) do not have any information about the underlying pages. These files are stored in .et format, but the parsing of that format is taken care of for you. VmtraceThe vmtrace application is the skeleton code for this assignment. In this assignment, that code does almost all of the work; we want you to have time to conduct an experiment, and also figure you got enough debugging in the last assignment.This project, since it does not involve modifying the kernel, does not require VMWare. The vmtrace package should work on pretty much any UNIX machine (which should include any recent version of Linux, Mac OS X, *BSD, Solaris, or even Linux running under VMware). It should even work on Windows using the Cygwin package (make sure you install the zlib package if you are using Cygwin). Because trace analysis is very CPU intensive, I'd like to encourage you to use your own machine, if possible. As always, please do not use attu. If you are using a shared machine, please nice(1) your vmtrace process. Ex: nice ./vmtrace [vmtrace arguments] Vmtrace is available on spinlock/coredump in /cse451/projects/vmtrace-1.X.tar.gz. (Where X is the release number number, which may be updated. Use the latest version.) For your convenience, the latest version is also available via http. Like simplethreads, vmtrace contains a lot of files, but most are safe to ignore. Pay attention to:
In summary, the steps are:
Run ./vmtrace -h to see the help/usage information. Note that you do not need to gunzip the tracefiles before using them; vmtrace will decompress them on the fly (assuming the zlib library is available on your system; the -h output will confirm this). vmtrace has several options intended to make simulation easier. It can append the statistics to a given file (-o FILE) rather than printing them to stdout. The results are reported in comma-separated-value format (CSV) for ease of analysis. I recommend using the -o option to save your stats in combination with the -v option, which will output progress information. To Add a Source FileIf you add a new .c file, do the following:
The AssignmentTo make your algorithms available, add them to the fault_handlers array in fault.c. See the random algorithm for an example. A printout of your experiment description is due in lecture on Wednesday, April 21st. The simulation currently reports the following statistics for each type of reference (instruction fetch, load, and store):
In addition, the statistics output includes the number of physical pages used, the page size (in bytes), the input file name, the replacement algorithm, and the simulation limit on number of references (or 0 if unlimited). This is intended to make it easier to track multiple experiments; using the same output file (-o), you can append successive trials to a single stats file. Note that the type statistics (ifetch/load/store) relate to the cause of the eviction or pageout, not the type of page that was evicted. You may find it useful to add more statistics to the simulation. Trace FileThe trace file is available on both spinlock and coredump as /cse451/projects/netscape.exe.et.gz. If you are using spinlock/coredump to run your simulation, there is no need to copy the file; use it directly out of /cse451/projects.A full trace simulation can take hours, so make sure to leave plenty of time for actually conducting the experiment. The nohup(1) command may be useful (normally, if you logout, your simulation would end; nohup in combination with background (&) will allow you to run your command and come back for the results later). If you have added any files, run tar -tzf vmtrace-1.X.tar.gz and check to make sure your new files are listed. Print your report and bring it to lecture on Monday, April 26. |
Computer Science & Engineering University of Washington Box 352350 Seattle, WA 98195-2350 (206) 543-1695 voice, (206) 543-2969 FAX [comments to kasiaw@washington.edu] |