From: Chuck Reeves (creeves_at_windows.microsoft.com)
Date: Wed Feb 11 2004 - 18:11:41 PST
The paper "Machine-Independent Virtual Memory Management for Paged
Uniprocessor and Multiprocessor Architectures", describes the design of
a portable kernel (Mach). It specifically focuses on the orgranization
of virtual memory and it's relationship to the apparently small amount
of code in the kernel dedicated to interacting with the physical
hardware. Not surprisingly, the design abstracts the underlying memory
management services typically available in a multi-processor system. The
design details five basic abstractions (task, thread, port, message and
memory object). Ports are a queued communication channels associated
with object and are protected by the kernel. They are analagous to
object reference in an OO environment. Tasks (processes) support a set
of function for allocation and management of virtual memory. Four
primary objects are used to manage that memory in Mach: resident page
table, address map, memory objects and a pmap. The resident page table
keeps track of virtual pages. Addresses are tracked by the address map.
It's references can locate regions in memory objects. The pmap carries
the hardware specific phsyical addresses and appears to translate from a
memory object reference. Memory objects are associated with pager
objects that handle the marshalling of data into and out of it's
persistent backing store. The interface for paging is quite succinct.
Section 3.4 discusses the data structures used to manage shared memory.
The optimizations presented surrounding shadow objects seemed logical. I
will require more time to fully understand the design tradeoffs
discussed in section 3.6. I didn't understand the test on
virtual-to-physical map management.
Porting the system to a PC in less than 3 months seems quite remarkable
to me. Especially that the person who did it had never written C before.
The difficulties described in avoding page faults when sharing pages on
the RT sounded familiar to the discussion from earlier in the year on
the x86.
Analysis of pmap.c sounds likes a good project for understanding some of
the fundamentals of how an OS works and something I would look forward
to.
This archive was generated by hypermail 2.1.6 : Wed Feb 11 2004 - 18:11:42 PST