Things to know for Chapter 9 What is virtual memory Memory that is sometimes in RAM, and sometimes on the disk. Where is it stored on the disk Somestimes in the exec file, sometimes on a "swap file", and sometimes on a "swap partition". Why do we do this? Get little used stuff out of RAM because we have a better use for RAM How do we know what to remove Belady's Min, LRU, clock langorithm, additional reference bits, etc. When do we remove it When the list of free pages is too small, we add using the above stuff. When do things come into RAM When a process accessess a page that is not in RAM, pick a frame from the free frame list schedule an I/O so something else when the data arrives, restart the process Copy on Write? Know what it is Know who can do it Demand Loading Don't bring in (some, all) of the pages for an exec. Just mark the page table and let them page fault in. Working Set The set of pages that need to be in RAM to not thrash Thrashing When you are always bringing in more pages, and everything is way too slow. What is a good page size? smaller is less waste for internal fragmentation (yea) smaller is larger page tables (boo) Program structure (see 9.9.5) --------------------------------------------------------------------- Sample Questions --------------------------------------------------------------------- Looking at a page table, what does it mean if the 'dirty bit' is set? Looking at a page table, what does it mean if the 'referenced bit' is set? Who unsets the referenced bit? Does swapping out to disk use DMA? Which ues copy-on-write? fork exec Why would a page table have a page entry that does not give any of read, write or execute permissions? Suppose I have a computer that is responding very slowly to commands. The hard drive light is continuously on. Which of these would significantly help my computer back on its feet? Get more cache Get larger hard drive and allocate more swap/paging area Page more data out to disk Swap more processes out to disk All or none of the above Kobe Bryant (a better player than any Pacer) wants to store and then access repeatedly a zillion small objects (12 bytes each). Which will cause fewer page faults, a 10M hash table accessed randomly, or a 10M array accessed linearly? He can only afford 5M of RAM. One problem with the Least Recently Used page replacement algorithm is ... (choose ONE) Is not the proveably optimal strategy like the frequency based approaches. Requires perfect knowledge of the future like Belady's Min. Has a common worst case. Can be unfair to processes that need lots of CPU time. None of the above. All of the above except that choice containing the word "none".