11/19/2010 1
Project 3
Tao Yang
11/19/2010 2
Project 3 Workload
- vm directory for part 1 is empty
– Need to come up the design and code – Leverage Project 2 experience
- Test C programs provided are sample code
and they may contain bugs.
- Amount of work
– Part 1. ~400 lines of code in vm ( few in userprog) – Part 2. ~250 or less in filesys (few in userprog)
- Part 1 and 2 can be done in parallel
11/19/2010 3
Project 3 part 1: Virtual Memory
- Work on vm subdirectory mainly
– And addrspace.cc/.h and exception.cc in userprog
- Create/manage a backing store (a file called SWAP using
the OpenFile class).
- Implement a page fault handler with dirty bit handling and
a page replacement policy (LRU or second chance)
- Design with no implementation for copy-on-write.
- Test under various conditions:
– One process with an address space larger than physical memory. – Concurrent processes with combined address space larger than physical memory.
11/19/2010 4
Project 3 part 2: File system
- Work on filesys subdirectoy mainly.
– And change system call handling code in userprog if needed (to use this extended file system).
- Extend the size of each file from 4K to 100K+
– Few single indirect pointers in i-node.
- Extensible file size (not fixed size).
– Can add more than 10 files to the directory (currently the disk directory file is a fixed size
- f 10 entries)
Part 1: Getting Started
- Read machine/translate.cc:
– In Machine:Translate() for virtual address translation, PageFaultException is detected when the desired page is not in memory. – In Machine:ReadMem, Translate() is called for translating the desired virtual memory address and machine->RaiseException() is called with PageFaultException error.
What is next
- Read mipssim.cc
– Machine->ReadMem() is called in executing each instruction. – If PageFaultException is detected, the exception handler should load the desired page. – The hardware will try again.
- Need to expand exception.cc to handle