CSE 120: Testing Multiprogramming Support

You will be overhauling the way processes are created to remove any assumptions about which physical pages are allocated to virtual pages. As a result, you can continue to test this part by running your user-level test programs from Part 1.

An effective way to test this part is to have your physical page allocator return physical pages in non-contiguous order. For example, when creating the address space for a program, loadSections will request a physical page for virtual page 0. Have your physical page allocator return the last physical page (page N-1) in this case rather than physical page 0. When it requests a physical page for virtual page 1, have the allocator return the next-to-last physical page, etc. If you are using a linked list to maintain physical pages, you could sort the linked list in reverse order, or return pages from the end of the list rather than the beginning.

Assigning physical pages to virtual pages in this manner will stress test your readVirtualMemory and writeVirtualMemory implementations.

Testing: Use your tests from the first part that stress readVirtualMemory and writeVirtualMemory, especially when the buffer passed in is larger than a page (e.g., like write10.c).