(8.3) | Given five memory partitions of 100 KB, 500 KB, 200 KB, 300 KB, and 600 KB (in order), how would each of the first-fit, best-fit, and worst-fit algorithms place processes of 212 KB, 417 KB, 112 KB, and 426 KB (in order)? Which algorithm makes the most efficient use of memory? |
(8.9) | Consider a paging system with the page table stored in memory.
|
(8.10) | Why are segmentation andpaging sometimes combined into one scheme? |
(9.5) | Assume we have a demand-paged memory. The page table is held in registers. It takes 8 milliseconds to service a page fault if an empty page is available or the replaced page is not modified, and 20 milliseconds if the replaced page is modified. Memory access time is 100 nanoseconds. Assume that the page to be replaced is modified 70 percent of the time. What is the maximum acceptable page-fault rate for an effective access time of no more than 200 nanoseconds? |
(9.7) | Discuss situations under which the least frequently used page-replacement algorithm generates fewer page faults than the least recently used page replacement algorithm. Also discuss under what circumstance does the opposite holds. |
(9.15) | What is the cause of thrashing? How does the system detect thrashing? Once it detects thrashing, what can the system do to eliminate this problem? |
The following questions concern a simple virtual memory simulator, defined by the following files: vm.cpp, PageTable.h, and PageTable.cpp. The simulator first prompts the user for the number of pages in logical memory and the number of frames in physical memory (page and frame numbers are assumed to start at 0). It then reads a succession of page numbers representing virtual memory accesses and carries out those accesses, swapping pages into physical memory when page faults occur. The results of each memory access, whether the page was found in memory or else swapped in, is displayed after each access. The simulator currently uses a FIFO page replacement algorithm. For example:
|