Machine-Independent Virtual Memory Management for Paged Uniprocessor and Multiprocessor Architectures Jordan Acedera Ishmael Davis Justin Augspurger Karl.

Slides:



Advertisements
Similar presentations
Slide 19-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 19.
Advertisements

OS Components and Structure
Operating System.
More on Processes Chapter 3. Process image _the physical representation of a process in the OS _an address space consisting of code, data and stack segments.
Memory Management: Overlays and Virtual Memory
G Robert Grimm New York University Virtual Memory.
MACHINE-INDEPENDENT VIRTUAL MEMORY MANAGEMENT FOR PAGED UNIPROCESSOR AND MULTIPROCESSOR ARCHITECTURES R. Rashid, A. Tevanian, M. Young, D. Golub, R. Baron,
Contd … MACH CASE STUDY BALAKUMAR. Agenda Communication implementation in MACH Memory Management Inheritance Copy-on-Write External Pagers.
16.317: Microprocessor System Design I
Computer Systems/Operating Systems - Class 8
Virtual Memory Virtual Memory Management in Mach Labels and Event Processes in Asbestos Ingar Arntzen.
Memory Management (II)
Virtual Memory Art Munson CS614 Presentation February 10, 2004.
By: Richard Rashid, Avadis Tevanian, Michael Young, David Golub, Robert Baronn, David Black, William Bolosky, and Jonathan Chew, October 1987 Presented.
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
CS 300 – Lecture 22 Intro to Computer Architecture / Assembly Language Virtual Memory.
Yousuf Surmust Instructor: Marius Soneru Course: CS550 Fall 2001
Chapter 3.2 : Virtual Memory
1 Last Class: Introduction Operating system = interface between user & architecture Importance of OS OS history: Change is only constant User-level Applications.
Computer Organization and Architecture
Threads CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
CS533 Concepts of Operating Systems Class 14 Extensible Virtual Memory Management.
1 OS & Computer Architecture Modern OS Functionality (brief review) Architecture Basics Hardware Support for OS Features.
Basics of Operating Systems March 4, 2001 Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard.
Protection and the Kernel: Mode, Space, and Context.
Paper Review Mach : A New Kernel Foundation For UNIX Development Chan Seok Kang 2013/02/26.
Topics covered: Memory subsystem CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
1 Chapter 3.2 : Virtual Memory What is virtual memory? What is virtual memory? Virtual memory management schemes Virtual memory management schemes Paging.
Processes and Threads Processes have two characteristics: – Resource ownership - process includes a virtual address space to hold the process image – Scheduling/execution.
The Structure of Processes (Chap 6 in the book “The Design of the UNIX Operating System”)
Chapter 9: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating Kernel.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming  To allocate scarce memory resources.
Chapter 1 : The Linux System Part 1 Lecture 1 10/21/
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
The Mach System Abraham Silberschatz, Peter Baer Galvin, Greg Gagne Presentation By: Agnimitra Roy.
A summary by Nick Rayner for PSU CS533, Spring 2006
1 Threads, SMP, and Microkernels Chapter Multithreading Operating system supports multiple threads of execution within a single process MS-DOS.
CS533 - Concepts of Operating Systems 1 The Mach System Presented by Catherine Vilhauer.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 9: Virtual Memory.
1 CSE451 Architectural Supports for Operating Systems Autumn 2002 Gary Kimura Lecture #2 October 2, 2002.
The Mach System Abraham Silberschatz, Peter Baer Galvin, and Greg Gagne Presented by: Jee Vang.
1 Machine-Independent Virtual Memory Management of Paged Uniprocessor and Multiprocessor Architectures by Rashid, Tevanian, Young, Golub, Baron, Black,
Paging (continued) & Caching CS-3013 A-term Paging (continued) & Caching CS-3013 Operating Systems A-term 2008 (Slides include materials from Modern.
M. Accetta, R. Baron, W. Bolosky, D. Golub, R. Rashid, A. Tevanian, and M. Young MACH: A New Kernel Foundation for UNIX Development Presenter: Wei-Lwun.
Processes and Virtual Memory
The Mach System Silberschatz et al Presented By Anjana Venkat.
M a c O S X CS-450-1: Operating Systems Fall 2005 Matt Grady – Mike O’Connor – Justin Rains.
Full and Para Virtualization
1 Lecture 1: Computer System Structures We go over the aspects of computer architecture relevant to OS design  overview  input and output (I/O) organization.
1 Process Description and Control Chapter 3. 2 Process A program in execution An instance of a program running on a computer The entity that can be assigned.
Disco: Running Commodity Operating Systems on Scalable Multiprocessors Presented by: Pierre LaBorde, Jordan Deveroux, Imran Ali, Yazen Ghannam, Tzu-Wei.
Lectures 8 & 9 Virtual Memory - Paging & Segmentation System Design.
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
Running Commodity Operating Systems on Scalable Multiprocessors Edouard Bugnion, Scott Devine and Mendel Rosenblum Presentation by Mark Smith.
Kernel Design & Implementation
Computer Organization
CE 454 Computer Architecture
Memory COMPUTER ARCHITECTURE
Memory Management Paging (continued) Segmentation
CS 6560: Operating Systems Design
The Mach System Sri Ramkrishna.
Mach OS.
Operating System Structure
Mach Kernel Kris Ambrose Kris Ambrose 2003.
Page Replacement.
Memory Management Paging (continued) Segmentation
Lecture 4- Threads, SMP, and Microkernels
CS533 Concepts of Operating Systems Class 14
Memory Management Paging (continued) Segmentation
Presentation transcript:

Machine-Independent Virtual Memory Management for Paged Uniprocessor and Multiprocessor Architectures Jordan Acedera Ishmael Davis Justin Augspurger Karl Banks

Introduction Many OS do not have VM support Mach goals: – Exploit hardware/software relationship – Portability – Handling of page faults Mach extends UNIX support Compatibility

Mach runs on the following systems: – VAX processors – IBM RT PC – SUN 3 – Encore Multimax – Sequent Balance 21000

Mach Design Basic abstractions – Task – Thread – Port – Message – Memory Object

Mach Design Basic Operations – Allocate memory – Deallocate memory – Set protection status – Specify inheritance – Create/Manage memory objects Limits of Mach Design

Mach Design

The Implementation of Mach Virtual Memory Presented by: Karl Banks

Data Structures Resident page table: keeps track of Mach pages residing in main memory (machine independent) Address map: a doubly linked list of map entries, each of which maps a range of virtual addresses to a region of a memory object Memory object: a unit of backing storage such as a disk file or a swap area Pmap: the memory-mapping data structure used by the hardware (machine dependent)

Pager Managing task; one associated with each memory object Handles page faults and page-out requests outside of the kernel If kernel sends pageout request to a user-level pager, it can decide which page to swap out If pager is uncooperative, default pager will be invoked to perform the necessary pageout

Mach Implementation Diagram Virtual address space of a process External Pager Default Pager Swap area File System

Sharing Memory: Copy-on-Write Case: tasks only read Supports memory-sharing across tasks

Sharing Memory: Copy-on-Write Case: write “copied” data New page allocated only to writing task Shadow object created to hold modified pages

Sharing Memory: Shadow Objects Collects modified pages resulting from copy-on- write page faults Initially empty with pointer to its shadowed object Only contains modified pages, relies on original object for rest Can create chain of shadow objects System proceeds through list until page is found Complexity handled by garbage collection

Sharing Memory: Read/Write Data structure for copy-on-write not appropriate (read/write sharing could involve mapping several memory objects) Level of indirection needed for a shared object

Sharing Memory: Sharing Maps Identical to address map, points to shared object Address maps point to sharing maps in addition to memory objects Map operations are then applied simply to sharing map Sharing maps can be split and merged, thus no need to reference others

Virtual Memory Management Part 2 Jordan Acedera Karl Banks Ishmael Davis Justin Augspurger

Porting Mach First installed on VAX architecture machines By May 1986 it was available for use – IBM RT PC, SUN 3, Sequent Balance, and Encore MultiMAX machines. A year later there were 75 IBM RT PC’s running Mach

Porting Mach All 4 machine types took about the same time to complete the porting process Most time spent was debugging the compilers and device drivers Estimated time was about 3 weeks for the pmap module implementation – Large part of that time was spent understanding the code

Assessing Various Memory Management Architectures Mach does not need the hardware data structure to manage virtual memory Mach – Need malleable TLB, with little code needed written for the pmap Pmap module will manipulate the hardware defined in-memory structures, which will control the state of the internal MMU TLB. – Though this is true, each hardware architecture has had issues with both the uni and multi processors.

Uniprocessor Issues Mach on the VAX – In theory a 2Gb address space is allocated to a process Problem – not practical - A large amount of space needed linear page table (8 MB) UNIX – Page tables in physical memory – Addresses only get 8, 16, or 64MB per process

Uniprocessor Issues VAX VMS – Pageable tables in the kernel’s virtual address space. Mach on the VAX – Page tables kept in physical memory – Only constructs the parts needed to map the virtual to real address for the pages currently being used.

Uniprocessor Issues IBM RT PC – Uses a single inverted page (not per-task table) Describes mapping for the addresses – Uses the hashing function for the virtual address translation (allows a full 4GB address space) Mach on IBM RT PC – Reduced memory requirements benefits – Simplified page table requirements – Only allows one mapping for each physical page (can cause page faults when sharing)

Uniprocessor Issues SUN 3 – Segments and page tables are used for the address maps (up to 256 MB each) – Helps with implementing spares addressing Only 8 contexts can exist at one time Mach on the SUN 3 – SUN 3 had an issue with display memory addressable as “high” physical memory. The Mach OS handled the issue with machine dependent code

Uniprocessor Issues Encore Multimax and Sequent Balance – Both Machines used the National MMU, which had problems Only 16 MB of VM can be addressed per page table Only 32 MB of physical memory can be addressed. A read-modify-write fault reported as a read fault – Mach depended on correct faults being handled – This was taken care of with the next MMU – National 32382

Multiprocessor Issues None of the multiprocessors running Mach supported TLB consistency To guarantee consistency, the kernel will have to know which processors have the old mapping in the TLB and make it flush Unfortunately – its impossible to reference or modify a TLB remotely or any of the multi processors running Mach

Multiprocessor Issues 3 solutions – 1 interrupt all CPU’s using a shared portion of an address and flush their buffers When a change is critical – 2 hold on map changing until all CPU’s have been flushed using a timer interrupt When mappings need to be removed from the hardware address maps – 3 allow temp inconsistency Acceptable because the operation semantics do not need to be simultaneous

Integrating Loosely-coupled and Tightly- coupled Systems Difficulties in building a universal VM model – different address translation hardware – different shared memory access between multiple CPUs fully shared/uniform access time (Encore MultiMax, Sequent Balance) shared/non-uniform access time (BBN Butterfly, IBM RP3) non-shared, message-based (Intel Hypercube) Mach is ported only for uniform shared memory (tightly- coupled) multiprocessor systems Mach does contain mechanisms for loosely-coupled multiprocessor systems.

Measuring VM Performance Mach performance is favored

Measuring VM Performance Program compiling, Compiling Mach kernel Mach performance is favored

Relations to Previous Work Mach's VM functionality derives from earlier OS – Accent and/or Multics Virtual space segment creation corresponding with files and other permanent data Efficient, large VM transfers between protected address spaces – Apollo's Aegis, IBM's System/38, CMU's Hydra Memory mapped objects – Sequent's Dynix, Encore's Umax Shared VM systems for multiprocessors

Relations to Previous Work Mach differs in its sophisticated VM features not tied to a specific hardware base Mach differs in its ability to additionally work in a distributed environment

Conclusion Growth of portable software and use of more sophisticated VM mechanisms lead to a need for a less intimate relationship between memory architecture and software Mach shows possibilities of – Portable VM management with few reliances on system hardware – VM management without negative performance impact Mach runs on a variety of machine architectures