100 likes | 114 Views
The VAX/VMS Virtual Memory System. Sangchul Kim(stdio@snu.ac.kr) School of Computer Science and Engineering Seoul National University. Contents. Background Page Table A real address space Page replacement Other neat VM tricks Summary. Background. 31 30 29 09 08 00.
E N D
The VAX/VMS Virtual Memory System Sangchul Kim(stdio@snu.ac.kr) School of Computer Science and Engineering Seoul National University
Contents Background Page Table A real address space Page replacement Other neat VM tricks Summary
Background 31 30 29 09 08 00 • VAX-11 minicomputer architecture • Introduced in late 1970’s by Digital Equipment Corporation (DEC) • VAX-11 hardware • The basic entity is the process • A byte-addressable, 32-bit virtual address space per process • 512-byte pages • Virtual address • 23-bit VPN • 9-bit offset
Background 0 230 231 232 Process Space System Space • Virtual address space • Process space • Low-address half of the address space • Unique to each process • Divided into two regions • System space • High-address half of the address space • Shared by all processes in the system • Only half of the system space is used
Page Table 31 30 27 26 25 21 20 00 • Page Table Entry (PTE) • A contiguous array of 32-bit page-table entries
Page Table • Defined by two hardware registers • Base address register • Bound (length) register • OS reduced the memory pressure • By segmenting the user address space into two • Unused portion of the address space • By placing user page tables into kernel virtual memory space • Allocating or growing a page table
A Real Address Space 0 230 231 232 User (P0) User (P0) System (S) • The kernel is a part of each user address space • The construction makes life easier for the kernel • OS does not worry of where the data comes from • If… • The kernel were located entirely in physical memory • It would be hard to swap pages of the page table to disk • The kernel were given its own address space • Moving data would be complicated and painful. • The kernel appears almost as a library to applications
Page Replacement Evicted Page (Clean) Resident Set (P1) Page Reclaim Free Page List Modified Page List Page Out (Clustered) Free FrameAllocated Evicted Page (Dirty) Resident Set (P2) Disk Page In • Problem • No reference bit • Memory hogs • Solution • Segmented FIFO • Resident set size (RSS) • Second chance list • Page Clustering • Overcome the small page size • Swapping could be inefficient
Other Neat VM Tricks Source: http://www.sarahness.net/the-lazy-persons-guide-to-not-being-lazy/2312/ on 2015/05/12 • Lazy optimization • Demand zeroing • Mark the page inaccessible. • If the process the reads or writes the page • The OS does needed works • Copy-on-write • Map it into the target address space • Mark it read-only in both address spaces • If one of the address spaces writes the page • The process can have private copy of the page
Summary • Virtual memory management in VAX-11 • Page replacement • Segmented FIFO • Page clustering • Virtual memory tricks • Lazy optimization • Demand zeroing • Copy-on-write