From: Cliff Schmidt (cliff_at_bea.com)
Date: Wed Feb 11 2004 - 14:08:52 PST
This paper describes the virtual memory management implemented by the
VAX/VMS family of hardware. Due to the range of hardware that the
system would be implemented on, the designers focused their attention
on tightly controlling the use of memory by processes and limiting the
associated overhead, including the I/O workload.
The virtual address space was divided up between system and user
space, much as it is today in a Windows system. The user space is
divided into a P0 and P1 region for the bottom half for program space
and the top half for control space, respectively. What was
interesting to me was that the P0 and P1 page tables were also paged
since they were in virtual memory. This essentially means two
lookups for each access. The linker allocates user program space
starting with the second page in the P0 region so that the first
page can be marked as no access. This was useful in catching
uninitialized pointers (although I didn't realize that uninitialized
pointers would necessarily contain zeros in all cases).
The paper also describes the pager and swapper, which I believe is
now a common pair of memory management components. The pager is
the mechanism that handles page faults within a particular process
while the swapper more efficiently deals with swapping out entire
process address spaces to and from disk. The design also uses a
process-local page replacement policy and a FIFO algorithm. At
first, I was surprised that this low-overhead approach would
achieve reasonable performance, but there are some really
interesting queuing and caching mechanisms that do significantly
improve performance.
Without the overhead of the typical system of determining LRUs
from periodically scanning and resetting reference bits, the
VAX/VMS designers chose to create a free page list and a
modified page list that delays the actual paging process. This
delay allows the system to find pages that were just about to be
paged and resets the paging process.
Another performance mechanism is clustering of page writes.
This design reduces the total I/Os by waiting to write a page
to disk until there are several that can be done at the same
time. Also, when a pager locates a page to be read, it checks
for adjacent segments and reads them in at the same time
(depending on the cluster block size).
The demand-zero idea is that pages that were just filled with
zeros (such as large initialized arrays) are noted and then
do not require a disk access. Instead one such page is set
up in memory and copied when needed, instead of being
retrieved from (or written to, in the case of no modifications)
disk.
This archive was generated by hypermail 2.1.6 : Wed Feb 11 2004 - 14:08:55 PST