Review of Machine Independent VMM in Mach (by Rashid et al)...

From: Prasanna Kumar Jayapal (prasak_at_winse.microsoft.com)
Date: Wed Feb 18 2004 - 01:19:22 PST


 

This paper ("Machine independent VMM") describes the design and implementation of virtual memory systems in an architecture-independent way. The Mach OS's VM system explained in this paper is an exercise in separating software abstractions from hardware necessities, without sacrificing on the system performance.

 

In Mach, "task" is the basic unit of resource allocation. Each task possess a large virtual address space (actual size dependant on the hardware), which can be mapped to other tasks and memory objects. The memory object assigned to the task manages the address space of the task. With each memory-object there is an associated task, or 'pager'. The kernel can communicate with the pager using appropriate ports to request data or notify important updates regarding the memory object. The chief advantage of the scheme is that page-out and page-fault requests can be handled by the pager without entering into the kernel. Different tasks communicate by sending messages to ports. Basic VM operations consist of allocate/de-allocate, copy, protect, inherit, read and write.

 

To efficiently use the physical memory, copy-on-write scheme is implemented in Mach virtual-memory system. Two or more processes can share a single memory-object using simple mapping technique. However, if any process tries to modify the shared object, a 'shadow-object' is created that contains only the modification information. Since shadow-objects can be created in a recursive manner and may clutter the system memory, Mach automatically runs garbage-collection service to eliminate/merge redundant shadow objects.

Most of the portion of Mach virtual-memory system is machine-independent. All the machine-dependent mapping is performed by a single memory-management module called 'pmap.c'. Due to elaborate virtual-memory data-structures kept and updated by Mach, virtual-to-physical mapping can be lazily evaluated to improve system performance. Since every module save one of Mach virtual-memory system is hardware-independent, it can be easily ported to different uniprocessor, multiprocessor or distributed architecture.

 

A list of supported architectures is given to show how Mach is portable. To consider performance, the speed of some VM operations (zero fill, fork, and read) are compared with UNIX and the task of compiling a kernel and some programs are compared with BSD. However I felt the performance section to be very brief.

The Mach paper was good about showing how a VM could be implemented in a machine-independent way by showing the different interfaces between the components. I am curious to see how well it actually worked on a multiprocessor machine.

 



This archive was generated by hypermail 2.1.6 : Wed Feb 18 2004 - 01:19:16 PST