Test 3 - Memory Management

CS 438, Operating Systems Analysis


  1. Paged virtual memory doesn't cause deadlock. Which of the four deadlock conditions does paged virtual memory directly invalidate? Explain.


    Paged virtual memory directly invalidates the no pre-emption condition: a process may hold a page frame, but the virtual memory manager can pre-empt the process's hold by paging out the page frame's contents. The page frame may then be given to some other process.


  2. Explain how the clock page-selection algorithm and next-fit free-space management have different policies but similar mechanisms.


    The clock page selection policy selects pages that have been resident in primary store the longest. The next-fit free-space policy finds free space blocks that are big enough to satisfy the requested block size.

    The clock page-selection mechanism orders the pages into a ring based on arrival times and remembers the location in the ring where the last page was selected. The search for the next page to select begins where the search for the previously selected page ended. The next-fit free-space mechanism arranges the free blocks in a ring based on address and remembers the location of the last free block allocated. The search for the next free block begins where the search for the previous free block ended.


  3. Is the page table provided in the project simulator inverted or not? Explain.


    A regular page table is indexed by page number; an inverted page table is indexed by page-frame number. The simulator's page table is indexed by page-frame number, so it's an inverted page table.


  4. A colleague of yours wants to improve the LRU paging algorithm by making it aware of processes' working sets. How much improvement would you expect to get? Explain.


    Not much. The LRU paging algorithm selects pages that haven't been accessed in a long time. Working sets prevent paging algorithms from selecting pages that have been accessed recently; that is, it encourages them to select pages that haven't been accessed recently.

    Both LRU and working sets select the same types of pages (not recently accessed ones). Also, and depending on implementation details, you might expect LRU to be more accurate than working sets in recognizing long unaccessed pages.



This page last modified on 20 November 2000.