UNIVERSITY OF WISCONSIN-MADISON
Computer Sciences Department
CS 537
Spring 2001
A. Arpaci-Dusseau
Quiz #7: April 10th -- Virtual Memory
Name: Student ID #:

Problem 1: A demanding question

What is demand paging? Circle all that apply.
A.  A policy for determining when to bring a page into memory.

B.  A policy for determining which page to replace.

C.  Loading a page into memory only on a page-fault.

D.  Starting a process with all of its pages resident in physical memory.

E.  Discarding the least-recently-used (LRU) page in the system.

Problem 2: A better question

Consider the page replacement policies of OPT, FIFO, and LRU. Which of the following statements are true? Be careful to notice when the phrase states "better than or equal to" versus "strictly better than". Circle all that apply.
 
A.  OPT always performs better than or equal to LRU.

B.  OPT always performs strictly better than LRU.

C.  LRU always performs better than or equal to FIFO.

D.  LRU always performs strictly better than FIFO.

E.  OPT with n+1 pages of physical memory always performs 
    better than or equal to OPT with n pages.

F.  OPT with n+1 pages of physical memory always performs 
    strictly better than OPT with n pages.

G.  FIFO with n+1 pages of physical memory always performs 
    better than or equal to FIFO with n pages.

H.  FIFO with n+1 pages of physical memory always performs 
    strictly better than FIFO with n pages.

I.  LRU with n+1 pages of physical memory always performs 
    better than or equal to LRU with n pages.

J.  LRU with n+1 pages of physical memory always performs 
    strictly better than LRU with n pages.

Problem 3: An inverted question

When would you recommend using an inverted page table? Circle all that apply.
A.  When the maximum amount of physical memory is much less than the
    maximum logical address space.

B.  When the maximum amount of physical memory is much greater than the
    maximum logical address space.

C.  When you want to support page sharing across different address spaces.

D.  When you are not concerned about page sharing across address spaces.

Problem 4: A working question

Why does the OS want to know the working set for each process? Circle the best answer and briefly explain your reasoning.
A.  To determine the best page to replace.

B.  To know when memory is over-committed.









Problem 5: A costly question

Consider the time required for each of the following operations. Arrange them in order of least costly to most costly, indicating any that require about the same amount of time. Please write a short justification of your ordering.
A.  Detecting a protection violation.
B.  TLB miss.
C.  Page fault with replacement of dirty page.
D.  Page fault with replacement of clean page.