Index: vm.tmpl =================================================================== RCS file: /home/courses/cs3204/gback/cvs/pintos/doc/vm.tmpl,v retrieving revision 1.5 diff -u -r1.5 vm.tmpl --- vm.tmpl 14 Jan 2007 02:05:53 -0000 1.5 +++ vm.tmpl 5 Nov 2007 05:28:34 -0000 @@ -21,8 +21,8 @@ >> preparing your submission, other than the Pintos documentation, course >> text, lecture notes, and course staff. - PAGE TABLE MANAGEMENT - ===================== + PAGE and FRAME TABLE MANAGEMENT + =============================== ---- DATA STRUCTURES ---- @@ -32,31 +32,36 @@ ---- ALGORITHMS ---- ->> A2: In a few paragraphs, describe your code for locating the frame, ->> if any, that contains the data of a given page. +>> A2: In a few paragraphs, describe your code for finding the +>> location that contains the data of a given page. >> A3: How does your code coordinate accessed and dirty bits between >> kernel and user virtual addresses that alias a single frame, or >> alternatively how do you avoid the issue? +>> A4: Explain your heuristic for deciding whether a page fault for an +>> invalid virtual address should cause the stack to be extended into +>> the page that faulted. + ---- SYNCHRONIZATION ---- ->> A4: When two user processes both need a new frame at the same time, +>> A5: When two user processes both need a new frame at the same time, >> how are races avoided? ---- RATIONALE ---- ->> A5: Why did you choose the data structure(s) that you did for +>> A6: Why did you choose the data structure(s) that you did for >> representing virtual-to-physical mappings? - PAGING TO AND FROM DISK - ======================= + PAGE REPLACEMENT + ================ ---- DATA STRUCTURES ---- >> B1: Copy here the declaration of each new or changed `struct' or >> `struct' member, global or static variable, `typedef', or >> enumeration. Identify the purpose of each in 25 words or less. +>> (Declarations may appear here or in A1 at your choosing.) ---- ALGORITHMS ---- @@ -67,28 +72,24 @@ >> process Q, how do you adjust the page table (and any other data >> structures) to reflect the frame Q no longer has? ->> B4: Explain your heuristic for deciding whether a page fault for an ->> invalid virtual address should cause the stack to be extended into ->> the page that faulted. - ---- SYNCHRONIZATION ---- ->> B5: Explain the basics of your VM synchronization design. In +>> B4: Explain the basics of your VM synchronization design. In >> particular, explain how it prevents deadlock. (Refer to the >> textbook for an explanation of the necessary conditions for >> deadlock.) ->> B6: A page fault in process P can cause another process Q's frame +>> B5: A page fault in process P can cause another process Q's frame >> to be evicted. How do you ensure that Q cannot access or modify >> the page during the eviction process? How do you avoid a race >> between P evicting Q's frame and Q faulting the page back in? ->> B7: Suppose a page fault in process P causes a page to be read from +>> B6: Suppose a page fault in process P causes a page to be read from >> the file system or swap. How do you ensure that a second process Q >> cannot interfere by e.g. attempting to evict the frame while it is >> still being read in? ->> B8: Explain how you handle access to paged-out pages that occur +>> B7: Explain how you handle access to paged-out pages that occur >> during system calls. Do you use page faults to bring in pages (as >> in user programs), or do you have a mechanism for "locking" frames >> into physical memory, or do you use some other design? How do you @@ -96,7 +97,7 @@ ---- RATIONALE ---- ->> B9: A single lock for the whole VM system would make +>> B8: A single lock for the whole VM system would make >> synchronization easy, but limit parallelism. On the other hand, >> using many locks complicates synchronization and raises the >> possibility for deadlock but allows for high parallelism. Explain