Memory Management Problem Set
Memory Management Problem Set
This assignment is to be done in the same pairs as for Assignment 2. You are to develop a simulation of virtual memory management so that you can explore the behaviour of the various algorithms presented in class. The following (partial) use case illustrates the expectations of the system: 1. User selects number of frames of memory and replacement algorithm to use 2. System displays table of frame contents (page number) and control bits, which is initially empty. 3. User selects a page number and action (read or write). o Alternative: user selects to load a sequence of actions from a file (e.g., as a text string of action and page #: "R 1 R 5 W 1 R 10 ..."). In this case the user should be able to single step through the actions observing their effect, or just run to completion. 4. System updates frame table and outputs status information, as follows: o Most recent action (e.g., page X loaded in Frame Y). o Total number of page of faults, page load, and page writes since start of simulation. o Percent of memory access that have resulted in a page fault. 5. Steps 3-4 repeat until user selects quit. The simulation can be implemented in any common programming language (e.g., Java, C++ etc.), but ability to run on Linux is an asset. You are strongly encouraged to develop an interface or base class for the replacement algorithm and write the remaining code in terms of that interface. You must implement at least two of the presented replacement algorithms. Submit your solution in the D2L dropbox.