1. 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?
設缺頁率為x,則x滿足:
2. Consider the following page reference string:
7, 2, 3, 1, 2, 5, 3, 4, 6, 7, 7, 1, 0, 5, 4, 6, 2, 3, 0 , 1.
Assuming demand paging with three frames, how many page faults would occur for the following replacement algorithms?
• LRU replacement
• FIFO replacement
• Optimal replacement
3. Consider a demand-paging system with a paging disk that has an average access and transfer time of 20 milliseconds. Addresses are translated through a page table in main memory, with an access time of 1 microsecond per memory access. Thus, each memory reference through the page table takes two accesses. To improve this time, we have added an associative memory that reduces access time to one memory reference if the page-table entry is in the associative memory. Assume that 80 percent of the accesses are in the associative memory and that, of those remaining, 10 percent (or 2 percent of the total) cause page faults. What is the effective memory access time?
4. 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?
抖動是因為高度頻繁的頁面調度活動造成的。例如進程沒有獲得需要支持活動使用頁面的足夠幀數,導致頻繁產生缺頁錯誤。如果CPU利用率不高,但是盤利用率很高,就說明可能產生了抖動。系統可以通過降低進程數來消除抖動問題。
5. In a 1,024-KB segment, memory is allocated using the buddy system. Using Figure 9.26 as a guide, draw a tree illustrating how the following memory requests are allocated:
• Request 6-KB • Request 250 bytes • Request 900 bytes
• Request 1,500 bytes • Request 7-KB
Next, modify the tree for the following releases of memory. Perform coalescing whenever possible:
• Release 250 bytes • Release 900 bytes • Release 1,500 bytes