SCMP 391 – Homework 13

Virtual Memory

  1. A machine has a 32-bit byte-addressable virtual address space. The page size is 4 KB. How many pages of virtual address space exist?
  2. A virtual memory has a page size of 1024 words, eight virtual pages, and four physical page frames. The page table is in Table 1.
    1. Make a list of all virtual addresses that will cause page faults.
    2. What are the physical addresses for 0, 3728, 1023, 1024, 1025, 7800, and 4096?
  3. A computer has 16 pages of virtual address space but only four page frames. Initially, the memory is empty. A program references the virtual pages in the order 0, 7, 2, 7, 5, 8, 9, 2, 4
    1. Which references cause a page fault with LRU?
    2. Which references cause a page fault with FIFO?
  4. A program on the Core i7 references local segment 10 with offset 8000. The BASE field of LDT segment 10 contains 10000. Which page directory entry does the Core i7 use? What is the page number? What is the offset?
  5. Compare internal fragmentation to external fragmentation. What can be done to alleviate each?
  6. Supermarkets are constantly faced with a problem similar to page replacement in virtual memory systems. They have a fixed amount of shelf space to display an ever- increasing number of products. If an important new product comes along, say, 100% efficient dog food, some existing product must be dropped from the inventory to make room for it. The obvious replacement algorithms are LRU and FIFO. Which of these would you prefer?
Virtual pagePage frame
03
11
2not in main memory
3not in main memory
42
5not in main memory
60
7not in main memory
Table 1

Scroll to Top