Contents | |
|
Your previous kernels used a single global memory layout, where the kernel and all processes shared access to the same memory, and granted kernel permissions to all user processes.
Now, you will extend the provided kernel with a demand-paged virtual memory manager and restrict user processes to user mode privileges (ring 3) instead of kernel mode privileges (ring 0). You will implement:
As a result, each process will get its own address space and will not be allowed to use certain instructions that could be used to interfere with the rest of the system. Assuming the kernel and kernel threads have no bugs/vulnerabilities, this will prevent buggy or malicious processes from corrupting the kernel and other processes. Furthermore, paging memory will allow programs to use more data than is available in RAM.
We also provide six test programs (process[1-4].c and th[1-2].c) that automatically test your memory manager when built. See
Testing for instructions on how to use these tests.The code for this project is a bit different from the other projects so far (e.g., PCB structure is different.) Don't Panic! You will need to look at kernel.[ch] and tlb.h to find useful data structures and functions. The test processes and kernel show you how your memory manager will be used.
There are many constants in these files that you'll want to use:
$ grep "PROCESS_STACK" *.h
$ grep "PROCESS_START" Makefile
$ grep "PAGE" *.h
NOTE: The start code ships with its own version of Bochs in bin and its own VGAROM and ROM in bios.
The start code is available on courselab at /u/318/code/project5.
This project will have a design review worth 5 points. You will be asked about the following things:
Each group must schedule a 10-minute design review slot.
To sign up for a design review, use our signup page.
Submit via Canvas; only one person per group should submit.