From: Jeff Duzak (jduzak_at_exchange.microsoft.com)
Date: Tue Feb 10 2004 - 22:11:38 PST
This paper describes the virtual memory mechanism implemented in the
Mach OS. This system allows a variety of virtual memory functionality
without being tied to any particular hardware architecture. In
contrast, Unix restricts its virtual memory support for sake of easy
portability.
Portability in the Mach VM system is achieved by separating the code
into machine-dependent and -independent modules. The interface between
these two sections allows the system to take advantage of any useful
hardware features for VM support, but does not require such features in
order for the overall system to work.
The Mach VM system is implemented as a mapping between virtual addresses
and memory objects. Paging data between memory objects and physical
memory is done by pager tasks. Memory objects and their associated
pager tasks can have a variety of implementations. For example, a
memory object can be a file on disk and the pager a file system. This
would effectively implement a memory mapped file.
The paper goes on to describe how the system implements copy-on-write
copying of memory, which puts off actual physical copying of memory
until one of the copies is modified. This allows for better
performance, particularly if very little of the copied memory is ever
modified. Further, this mechanism can be used to share data between
untrusted tasks without immediately making physical copies of the shared
data.
The Mach system was ported to several machines with varied hardware
support for VM. Some of the machines provided hardware support that was
very advantageous to Mach. For example, the reverse page table of the
IBM RT PC. However, all machines showed some problems supporting the
system.
The performance of the Mach system was compared with Unix on a VAX
machine. Measurements of basic VM operations as well as VM-intensive
tasks showed that Mach performed better than Unix on most tasks, and
only slightly worse on one task. Therefore, the paper shows that
supporting a variety of VM features in a manner easily portable between
different machine architectures doesn't require a performance hit.
This archive was generated by hypermail 2.1.6 : Tue Feb 10 2004 - 22:11:46 PST