Next: What to Turn Up: No Title Previous: General Description

The Assignment

1. Implement software-management of the TLB. For this, you will need to implement some kind of software page translation, for handling TLB misses. Note that with the compile time flag -DUSE_TLB, the hardware no longer deals with page tables; thus, you need to do something about making sure the TLB state is set up properly on a context switch. Most systems simply invalidate all the TLB entries on a context switch; the entries get re-loaded as the pages are referenced. For item 2, your page translation scheme should keep track of the dirty and use flags for each page set by hardware in the TLB entry.

2. Implement virtual memory. For this, you will need routines to move a page from disk to memory and from memory to disk. In order to find unreferenced pages to throw out on page faults, you will need to keep track of all of the pages in the system which are currently in use. A simple way to do this is to keep a ``core map'', which is basically an inverted page table - instead of translating virtual page numbers to physical pages, a core map translates physical page numbers to the virtual pages that are stored there.

3. Write a set of ``useful'' user programs that demonstrate both a small and large number of each kind of miss, for both the TLB and paging from disk. In other words, write one test program that that demonstrates a small number of capacity TLB misses, then one that demonstrates a small number of capacity page faults, then one that demonstrates a large number of capacity TLB misses, etc. As an example, both sort.c and matmult.c in the ``test'' directory demonstrate a large number of conflict misses for most standard paging policies.

For each test case, explain its performance on your system, and say how you might improve the performance of your system.

You will probably find it useful to reduce the size of main memory (in machine.h), to more quickly incur paging behavior.



Next: What to Turn Up: No Title Previous: General Description


archna@mimas.cs.umass.edu
Wed May 14 11:44:32 EDT 1997