Virtual Memory Management in VAX/VMS

From: Manish Mittal (manishm_at_microsoft.com)
Date: Wed Feb 11 2004 - 15:42:32 PST

  • Next message: Ankur Rawat \(Excell Data Corporation\): "VAX/VMS VMM review"

    The VAX/VMS OS needed a memory management system that would work for
    both real-time, batch systems and for systems with a wide range of
    memory capabilities. This paper introduces the design and implementation
    of virtual memory management in the VAX/VMS OS. The goal is to extend
    memory address space and to enhance performance in different
    applications environments.

     

    The basic entity for VM is process. Each process has a byte-addressable,
    32 bit virtual address space divided into 512 byte pages. 21 bits are
    used for virtual page number and 9 bits for offset within a page. The
    remaining upper two bits divide the process address space into a number
    of functional regions. An unused reserved region and a system region
    make up the high address half known as the system space and are shared
    by all processes in the system. The low-address half is known as process
    space and is unique to each process. It is further divided into two
    regions which can grow/shrink dynamically - P0 or program region and P1
    or control region. Each region is defined by a page table which contains
    valid bit, protection field, modify bit, operating system field and
    physical frame number. Protection is checked by hardware for all
    entries. Each page table is defined by two hardware registers - base and
    length. A translation buffer is provided for caching virtual-to-physical
    translations. Since the system page tables and translation buffer cache
    is part of all processes it is un-affected by a context switch.

     

    The virtual memory management is implemented with a pager and a swapper.
    The pager is responsible for the paging in/out associated with a page
    fault, while the swapper is responsible for swapping entire processes on
    a context switch. For each process the pager maintains a data structure
    for the set of pages currently in memory called resident set. The pager
    generally place the pages moved out of a process resident set on a
    free-page-list or a modified-page-list. These lists act as caches,
    allowing processes to retrieve the pages before they are returned to the
    disk. They also help reduce the fault rates for the system. Pages are
    read in/ written out in clusters to reduce the extent of page faulting.
    The swapper helps ensure that the high-priority processes are resident
    in the memory and reduces the rate of paging caused by recently-resumed
    processes. The swapper allows a process to resume only if there is
    enough physical memory available for the process resident set.
    Clustering works by reading/writing contiguously located pages in one
    I/O operation. This approach helps overcome the I/O disadvantage of a
    small page size that was chosen for file-system compatibility with older
    systems.

     

    This paper is very well organized and the explanation of VM concept is
    very detailed. The most attractive feature of the paper is the
    simplicity of the design and implementation. This paper has established
    features based on which most of the modern day VM's have been built.
    Some of these features being paging, clustering and process swapping.
    This paper also introduces some concepts to manage memory more
    efficiently like caching of pages, maintaining a free list of pages to
    reduce fault hit rate and delayed writing of modified pages to improve
    performance. One thing that is not clear to me is what happens to the
    write modified pages if a system crashes.

     


  • Next message: Ankur Rawat \(Excell Data Corporation\): "VAX/VMS VMM review"

    This archive was generated by hypermail 2.1.6 : Wed Feb 11 2004 - 15:42:42 PST