CS262A Reading Summary 3

Machine-Independent Virtual Memory Mangement for Paged Uniprocessor and Multiprocessor Architectures

Richard Rashid et al.
Summary by Feng Zhou
9/8/2002

This paper presents a machine independent way of implementing VM in the context a micro-kernel OS (Mach). Main strength points of the paperinclude,

  1. Functionality of VM management is divided into kernel part and a number of "pagers", which implement different paging methods and back stores.  This separation of concerns, which is the main idea of a micro-kernel OS, makes the system more modularized, extensable and robust.  Abstract message passing is the basic means of communication between tasks including the pagers, which results in more independent and portable VM implementation.
  2. Machine-independent is the most significant feature of VM management in Mach.  This is implemented by several techniques.  A Mach physical page is actually mapped to 1 or several hardware physical pages.  All state information of VM (virtual-physical page mapping, page status flags) is maintained by machine-independent part of VM system.  However, relevant architecture-specific features, if available, are used to improve VM performance.  Only one machine-dependent module (pmap.c) with a small interface is required to be ported to each platform.
  3. Because Mach VM is (almost) machine independent, its VM implementation can be seen as a generic model for VM implementations.  It basically has a four-level data structure: Address Map, Memory Objects, Resident Page Table and Mach Physical Pages.  Shadow Memory Object is used to efficiently support copy-on-write operation.  Sharing Map, as another layer of abstraction between the Address Map and Memory Objects, is used to support read-write memory sharing between tasks.

One major flaw:

Memory Object is one source of complexity in Mach VM implementation.  It imposes the requirement of Shadow Objects and the problem of excessive chain of Shadow Objects.  I'd argue that using a flat but pageable page table will make things simpler.  This is somewhat analogous to segmentation vs. paging.