CS3421 Problem Set 14

Virtual Memory

  1. Show how the virtual->physical address translation hardware divides up a 32-bit address when the page size is 16K.

  2. Given a machine with a 4K page size, complete the table below showing the physical address corresponding to the given virtual address. Write "page fault" if the virtual address results in a page fault, "segmentation fault" if the virtual address cannot be translated.

    virtual address physical address
    0  
    32768  
    17000  
    21000  
    8676  

    Use the following page table to complete the translations.

    present frame number
    1 5
    1 9
    1 17
    1 3
    1 4
    0 0
    1 6
    1 20

  3. Explain how a referenced bit in a page table entry is used to implement an approximation to LRU replacement.

  4. Explain how the use of a page table keeps one program from reading or writing another program's instructions/data. Assume no page sharing is done.