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: this start code ships with its own bochs VGAROM and ROM. You may have to edit the provided bochsrc to get it to point to the right places... but it should be okay!
The start code is available on the lab machines at /u/318/code/project5/p5_start_code.tar.gz
This project will have, like the others, a design review worth 5 points. I'll ask about the following things:
Also, you should read through the whole project description before showing up to design review. Students missed points last time for questions with answers directly on the project description.
Each group must schedule a 10-minute design review slot. The review will take place on Tuesday Nov 25 8-12:30-ish in the Fishbowl. Additional flexibility will be provided for extreme circumstances.
Some tips:
To sign up for a design review, use our signup page. We provide 27 time slots on Nov 25.
Submit via Dropbox; only one person per group should submit. When submitting the assignment, please turn in the files specified in the Dropbox, along with your readme (less than 500 words in text format).