1 / 24

Virtual Memory Management in the VAX

Introduction. VAX-11/780 and VAX-11/750 were DEC's first implementation of the 32-bit architectureThe Operating System on them was a VAX/VMSBuilt on the experience of the PDP-11 systemIntended to provide a single environment for all VAX

adie
Download Presentation

Virtual Memory Management in the VAX

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


    1. Virtual Memory Management in the VAX/VMS Operating System Henry Levy and Peter Lipman, DEC Presenter – Abhijeet Mahule

    2. Introduction VAX-11/780 and VAX-11/750 were DEC’s first implementation of the 32-bit architecture The Operating System on them was a VAX/VMS Built on the experience of the PDP-11 system Intended to provide a single environment for all VAX –based applications These applications included real-time, time shared or batch.

    3. Motivation VAX/VMS had to operate on a family of processors These processors had different performance characteristics The physical memory capacities ranged from 250KB to more than 8M bytes Memory management system had to be capable of handling changing demands of timesharing system Also they had to allow the predictable performance of batch/real-time systems

    4. VAX-11 hardware Basic entity in the VAX-11 system is the process Each process has a byte-addressable 32-bit virtual address space This address space is divided into 512-byte pages The 32-bits of an address contain 21-bit virtual page number and a 9-bit byte offset within the page Page is the basic unit of mapping and protection

    5. VAX-11 hardware The upper two bits of the virtual address divide the process address space into a number of functional regions or spaces Bit 31 Bit 30 Region/Space 0 0 Program region (P0) 0 1 Control Region (P1) 1 0 System Space 1 1 Unused Bits 9 – 29 (21 bits) refer to the Virtual Page number Bits 0 – 8 (9 bits) refer to byte offset within the page

    6. VAX-11 hardware – System Space The high address half of the address space (bit 31 = 1) is system space and is shared by all processes in the system Thus, a system space virtual address generated by any process will access the same physical memory location Only half of the system space is utilized in this architecture

    7. VAX-11 hardware – Process Space The low-address half of the address space (bit 31 = 0) is known as process space and is unique to each process Process space is divided into two regions by bit 30 of the virtual address The low-address half, known as P0 is the program region The high-address half, known as P1 is the control region

    8. VAX-11 hardware - Regions Each region – System, Program and Control, is defined by a page table A VAX-11 page table is a contiguous array of 32-bit page table entries Each page table entry or PTE contains: A valid bit (PTE <31>) indicates whether the page table entry contains mapping info

    9. Page Table Entry (PTE) fields contd… A protection field (PTE <30:27>) that indicates what privilege is required to read or write the page A modify bit ( PTE <26>) that indicates whether write access has occurred to the page A field used by the Operating System (PTE <25:21>) The physical page frame number (PTE <20:0>) that locates the page in physical memory

    10. VAX-11 registers Each page table is defined by two hardware registers: base address register and length register The System space page table is located by reference to the system page table base register, which contains its physical address The P0 and P1 page tables for each process are located in system space section of the address space P0 and P1 page table base registers contain virtual addresses

    11. Use of address space by VAX/VMS All the three address regions are used for specific purposes All executable code and data including some process-specific data structures and process page tables, are stored in system region First few pages of system space, called vector region, contain pointers to executive service routines

    12. Use of address space by VAX/VMS VAX/VMS is a collection of procedures that exist in the address space of each process These procedures can be called explicitly or implicitly to perform services on behalf of a process. The operating system does not have a separate address context.

    13. Use of address space by VAX/VMS The P0 (program) region contains the user’s executable program The user’s program can dynamically grow into higher-addressed sections of P0 space VAX/VMS uses the P1 (Control) region to store process-specific data P1 is also used to store the program image for command interpreter The user’s stack is located in low address part of P1 region

    14. Memory management implementation The typical concerns in a paging system were: Effect of one or more heavily paging programs on other programs in the system High cost of program start up and restart time in virtual memory environments Increased disk workload caused by paging Processor time consumed by searching page lists To overcome these problems, VAX/VMS is divided into two basic components: pager and swapper

    15. Memory management implementation Pager: It is an operating system procedure that executes as result of page fault It executes within the context of the faulting process It is responsible for loading and removing process pages into and out of memory Swapper: It is a separate process responsible for loading and removing entire process into and out of memory

    16. Memory management implementation A limit is placed on the amount of physical memory a process may occupy The set of pages currently in memory for a process is called the process’s resident set and is described by a pager data structure When a new program is started, its resident set is initially empty As the program executes, the pager loads the page whenever a non-resident page is referenced

    17. Memory management implementation When the resident-set limit is reached, the faulting process must release a page for each newly faulted page added to its resident set. FIFO replacement algorithm is used to select the page to be removed When a page is removed from a process’s resident set, it is placed on one of two page lists: the free page list or the modified page list

    18. Memory management implementation If the modify bit is zero in the page table entry, the page is added to the tail of the free list If the modify bit is one in the page table entry, the page is queued on the tail of the modified page list. If a process faults a page that is on either list, the page is returned to the process’s resident set

    19. Clustering of pages The page size chosen for VAX/VMS is 512 bytes which can increase I/O overload due to small size VAX/VMS reduces the paging overload by reading and writing several pages at a time, which is known as clustering The cluster size is the maximum number of pages the pager will attempt to load at once. A user can specify a default cluster size when a program is linked

    20. Write Optimizations VAX/VMS delays the modified-page write requests and gains these optimizations: If the page on the modified page list is referenced, it is returned to the process at minimum cost When a write request must be performed, many pages can be written at once Pages can be arranged on the paging file so that clustering on read requests is possible Due to delayed writes, many page writes are avoided because either the pages are faulted again or program terminates

    21. Swapper Entire resident sets can be swapped between memory and the backing store. This is handled by a process called swapper which is executed whenever it is awakened by the operating system Whenever a process is removed from the memory, its entire resident set is written to a swap file, along with some process specific operating system data. The swapper operation may be performed in several pieces

    22. Swapper The swapper writes all resident-set pages to a contiguous section of the swap file When a process not in memory becomes able to execute, it is read in by the swapper The swapper allocates pages for the resident set, page tables, and operating system data structures. When a new process is created, the swapper swaps in a process shell, which provides the initial environment in which a program can be executed

    23. Conclusions VAX/VMS takes a slightly unorthodox approach to virtual memory management Three major mechanisms have been used to enhance the performance of the OS:- Caching of pages: reduces the number of disk I/O transactions Clustering: provides transfer efficiency of large pages along with the fragmentation characteristics of small pages Use of process-local replacement along with swapping: to reduce the effect of one process’s paging activities on another’s

    24. Thank You! Questions?

More Related