History
The VAX-11 minicomputer architecture was introduced in the late 1970s by Digital Equipment Corporation (DEC).
The OS for the system was known as VAX/VMS (or just plain VMS), one of whose primary architects was Dave Cutler, who later led the effort to develop
As an additional issue, VMS is an excellent example of software innovations used to hide some of the inherent flaws of the architecture. Although the OS often relies on the hardware to build efficient abstractions and illusions, sometimes the hardware designers don’t quite get everything right. In the VAX hardware, we’ll see a few examples of this, and what the VMS operating system does to build an effective, working system despite these hardware flaws.
Features
The VAX-11 provided a 32-bit virtual address space per process, divided into 512-byte pages. Thus, a virtual address consisted of a 23-bit VPN and a 9-bit offset. Further, the upper two bits of the VPN were used to differentiate which segment the page resided within; thus, the system was a hybrid of paging and segmentation, as we saw previously.
The lower half of the address space was known as “process space” and is unique to each process. In the first half of process space (known as P0
), the user program is found, as well as a heap which grows downward. In the second half of process space (P1
), we find the stack, which grows upwards. The upper half of the address space is known as system space (S
), although only half of it is used. Protected OS code and data reside here, and the OS is in this way shared across processes.
Concerns
One major concern of the VMS designers was the incredibly small size of pages in the VAX hardware (512 bytes). This size, chosen for historical reasons, has the fundamental problem of making simple linear page tables excessively large. Thus, one of the first goals of the VMS designers was to ensure that VMS would not overwhelm memory with page tables.
The system reduced the pressure page tables placed on memory in two ways. First, by segmenting the user address space into two, the VAX-11 provides a page table for each of these regions (P0
and P1
) per process; thus, no page-table space is needed for the unused portion of the address space between the stack and the heap. The base and bounds registers are used as you would expect; a base register holds the address of the page table for that segment, and the bounds holds its size (i.e., number of page-table entries).
ASIDE: THE CURSE OF GENERALITY
Operating systems often have a problem known as the curse of generality, where they are tasked with general support for a broad class of applications and systems. The fundamental result of the curse is that the OS is not likely to support any one installation very well. In the case of VMS, the curse was very real, as the VAX-11 architecture was realized in a number of different implementations. It is no less real today, where Linux is expected to run well on your phone, a TV set-top box, a laptop computer, desktop computer, and a high-end server running thousands of processes in a cloud-based datacenter.
Second, the OS reduces memory pressure even further by placing user page tables (for P0
and P1
, thus two per process) in kernel virtual memory. Thus, when allocating or growing a page table, the kernel allocates space out of its own virtual memory, in segment S
. If memory comes under severe pressure, the kernel can swap pages of these page tables out to disk, thus making physical memory available for other uses.
Putting page tables in kernel virtual memory means that address translation is even further complicated. For example, to translate a virtual address in P0
or P1
, the hardware has to first try to look up the page-table entry for that page in its page table (the P0
or P1
page table for that process); in doing so, however, the hardware may first have to consult the system page table (which lives in physical memory); with that translation complete, the hardware can learn the address of the page of the page table, and then finally learn the address of the desired memory access. All of this, fortunately, is made faster by the VAX’s hardware-managed TLBs, which usually (hopefully) circumvent this laborious lookup.
Get hands-on with 1400+ tech skills courses.