Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on May 17th, 2011  |  syntax: None  |  size: 2.22 KB  |  views: 791  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. 9.16 a. When a process first starts execution, the page fault rate would be 100% because there are no pages in memory to begin with so the process must fault each time until every page that it needs is in memory.
  2. b. As long as the working set it not too large to be stored in available free memory, once the working set for a process is loaded into memory, the page fault rate would be 0%. This is because every page that it needs is in memory.
  3. c. If a process changes its locality and the size of the new working set is too large to be stored in available free memory designers would have to choose the best page replacement algorithm to handle this situation. Some options would be the first-in, first-out; optimal; or least-recently-used.
  4. 9.19 The copy-on-write feature is a technique that allows the parent and child processes initially to share the same pages. These shared pages are marked as copy-on-write pages, meaning that if either process writes to a shared page, a copy of the shared page is created. This feature is beneficial to use when two programs are sharing data. The hardware support that is required to implement this feature would be that for each memory access you would have to check the page table to see if the page is set to copy-on-write.
  5. 9.20 Since the size of the logical address space is 2^32 and the page size is 4096 bytes (2^12), the page table is 2^20. So the logical address 11123456 would be translated to binary and the lower 12 bits would be the page offset and the upper 20 bits would be the page number.
  6. 9.21
  7. 200ns = (1-p)100ns + (0.7p)20ms + (0.3p)8ms
  8. 200ns = (1-p)100ns + (0.7p)20,000,000ns + (0.3p)8,000,000ns
  9. 200ns = 100ns – 100p + 14,000,000p + 2,400,000p
  10. 100ns = 16,399,900p
  11. 0.000006098 = p
  12. 9.22 If one user thread incurs a page fault while accessing its stack, the other user threads belonging to the same process would also have to wait for the faulting page to be brought into memory. This is because the mapping of user threads to kernel thread is many to one so if one thread blocks and relinquishes the kernel thread they will all have to block and wait.
  13. 9.24 a. If the pointer is moving fast, the system is accessing many pages.
  14. b. If the pointer is moving slow, the system is accessing fewer pages.
clone this paste RAW Paste Data