Machine-Independent Virtual Memory Management for Paged Uniprocessor and Multiprocessor Architectures Richard Rashid, et al. - 1988 --------------------------------------------------- Summary: This paper describes the Mach virtual memory system, which was designed with an emphasis on portability without sacrificing functionality or performance. Functional Features: 1. Read-write sharing w/ copy-on-write 2. User-level pagers 3. Memory-mapped files Design Decisions, Motivations, and Issues: D1. To address data, the kernel uses byte offsets into memory objects (analogous to UNIX files) rather than VPN/offset. M1. Avoids linking the implementation to a particular notion of physical page size. I1. VA translation: - VA region found in Address Map (sorted linked list that maps contiguous regions of VA-space to contiguous regions of memory objects) to obtain memory_object/offset. - PPN found in hash table keyed on memory_object/offset. Sharing: - Copy-on-write achieved through a shadow object, which has a pointer back to the memory object it is shadowing. Changed pages are written to the shadow objects, but unchanged pages are accessed via the pointer to the original object. - Read/write sharing is achieved with an extra level of indirection. Tasks sharing a region of a memory object have entries in their address maps point to a sharing map rather than to the memory object itself. This sharing map is an address map that points to the memory object. D2. Message-based IPC M2. Extends nicely to multiprocessor and distributed systems because there is a consistent interface to all resources independent of the machine's hardware and OS. I2. Most message-based systems suffer in performance, so Mach's VM and IPC are integrated to make sending large messages efficient using copy-on-write (performance same as memory remapping). D3. pmap (physical address map; e.g. for a VAX a pmap is a page table) management is the only machine-dependent component. For performance, the pmap is not required to contain all currently valid mappings; all but a few essential kernel virtual-to-physical mappings can be thrown away to improve either space or speed efficiency. Discussion: - Why can't read/write sharing be done by having address maps point to a shared memory object? - Why are there current and maximum values for protection (described on page 3, last paragraph)? - Is memory copying the main reason for bad performance in message-based IPC systems? Are there other factors?