CS 134

Written Component

As with HW 5, a copy of these questions is provided in the handin/written.md file in your repository. Put your answers in that file.

A: Physical Memory Management

  1. What is the coremap used for? Where is it defined?
  2. What does the piggish_kernel function do and why is it important?
  3. When and why do pages get “pinned”? What operations require pinning?
  4. What is coremap_alloc_multipages used for and why must these pages be contiguous?
  5. How does the system ensure that a page being evicted is written to swap if necessary?

B: Virtual Memory Organization

  1. What are lpages used for, and how do they relate to addrspaces and vm_objects?
  2. The VM system can zero-fill pages on demand. How does it do that and what are the benefits?
  3. How many different types of VM objects might exist in a typical process's address space? What are they used for?

C: Page Fault Handling

  1. What functions are called when a page fault occurs? What's the call chain?
  2. What data structures are accessed during page-fault handling and in what order?
  3. How many pages can be paging in (via swap_pagein) at a time? Why this limitation?
  4. What's the difference between a major and minor page fault? How does the system handle each?

D: TLB Management

  1. What are the high and low parts of a TLB entry used for?
  2. What does mmu_unmap do and when is it necessary?
  3. What is a “TLB shootdown” and why is it necessary in multiprocessor systems?

E: Swap Management

  1. What's the difference between swap_alloc and swap_reserve? Which one(s) can fail and why?
  2. Why is swap space reservation necessary for zero-filled pages?

(When logged in, completion status appears here.)