X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=doc%2Fvm.texi;h=37b53f766d9f710b8b9ed134846ae7b2abbc6843;hb=802376f1c03544a1f0576775d178f288f58b2315;hp=6176bbd8dbf4ad38a170347586b18866b8aaa779;hpb=f7bc12fb5e4c3eb3ebb633f99b8b266622fc57f7;p=pintos-anon diff --git a/doc/vm.texi b/doc/vm.texi index 6176bbd..37b53f7 100644 --- a/doc/vm.texi +++ b/doc/vm.texi @@ -316,12 +316,12 @@ Some way of translating in software from virtual page frames to physical page frames. Pintos provides a hash table that you may find useful for this purpose (@pxref{Hash Table}). -It is possible to do this translation without adding a new data -structure, by modifying the code in @file{userprog/pagedir.c}. However, -if you do that you'll need to carefully study and understand section -3.7, ``Page Translation Using 32-Bit Physical Addressing,'' in -@bibref{IA32-v3a}, and in practice it is probably easier to add a new -data structure. +You don't strictly need a new data structure for this. You could +instead modify the code in @file{userprog/pagedir.c}. If you do that +you'll need to thoroughly understand how 80@var{x}86 page tables work +by, e.g.,@: studying section 3.7, ``Page Translation Using 32-Bit +Physical Addressing,'' in @bibref{IA32-v3a}. In practice, most groups +use a separate data structure. @item Some way of finding a page on disk (in a file or in swap) if it is not @@ -420,11 +420,10 @@ Bits}) to implement an approximation to LRU. Your algorithm should perform at least as well as the ``second chance'' or ``clock'' algorithm. -Your design should allow for parallelism. Multiple processes should -be able to process page faults at once. If one page fault require +Your design should allow for parallelism. If one page fault requires I/O, in the meantime processes that do not fault should continue -executing and other page faults that do not require I/O should be able to -complete. These criteria require some synchronization effort. +executing and other page faults that do not require I/O should be able +to complete. These criteria require some synchronization effort. @node Lazy Loading @subsection Lazy Loading @@ -713,7 +712,7 @@ with the file mapped into your address space, you can directly address it like so: @example -write (addr, 64, STDOUT_FILENO); +write (STDOUT_FILENO, addr, 64); @end example Similarly, if you wanted to replace the first byte of the file,