CS533 Concepts of Operating Systems. Jonathan Walpole

Similar documents
G Disco. Robert Grimm New York University

Disco: Running Commodity Operating Systems on Scalable Multiprocessors

Virtual Machines Disco and Xen (Lecture 10, cs262a) Ion Stoica & Ali Ghodsi UC Berkeley February 26, 2018

Virtual Machines. 2 Disco: Running Commodity Operating Systems on Scalable Multiprocessors([1])

Disco: Running Commodity Operating Systems on Scalable Multiprocessors

Disco. CS380L: Mike Dahlin. September 13, This week: Disco and Exokernel. One lesson: If at first you don t succeed, try try again.

DISCO and Virtualization

Disco: Running Commodity Operating Systems on Scalable Multiprocessors

Background. IBM sold expensive mainframes to large organizations. Monitor sits between one or more OSes and HW

Modern systems: multicore issues

COMPUTER ARCHITECTURE. Virtualization and Memory Hierarchy

CSE 120 Principles of Operating Systems

Pmake NFS. Scientific App SMP OS. Thin OS DISCO PE PE PE PE PE PE PE PE. Interconnect. CC NUMA Multiprocessor

Virtualization and Virtual Machines. CS522 Principles of Computer Systems Dr. Edouard Bugnion

CS-736 Midterm: Beyond Compare (Spring 2008)

CSCI 8530 Advanced Operating Systems. Part 19 Virtualization

Virtual Virtual Memory

Virtualization and memory hierarchy

COS 318: Operating Systems. Virtual Machine Monitors

INFLUENTIAL OS RESEARCH

Background. IBM sold expensive mainframes to large organiza<ons. Monitor sits between one or more OSes and HW

CS 333 Introduction to Operating Systems. Class 11 Virtual Memory (1) Jonathan Walpole Computer Science Portland State University

Introduction to Cloud Computing and Virtualization. Mayank Mishra Sujesha Sudevalayam PhD Students CSE, IIT Bombay

15 Sharing Main Memory Segmentation and Paging

CS 350 Winter 2011 Current Topics: Virtual Machines + Solid State Drives

CSCE 410/611: Virtualization!

Virtual Machines. To do. q VM over time q Implementation methods q Hardware features supporting VM q Next time: Midterm?

Chapter 5 Large and Fast: Exploiting Memory Hierarchy (Part 2)

Background. IBM sold expensive mainframes to large organiza<ons. Monitor sits between one or more OSes and HW

Chapter 5 (Part II) Large and Fast: Exploiting Memory Hierarchy. Baback Izadi Division of Engineering Programs

System Virtual Machines

System Virtual Machines

CS370: Operating Systems [Spring 2017] Dept. Of Computer Science, Colorado State University

Advanced Operating Systems (CS 202) Virtualization

Xen and the Art of Virtualization

16 Sharing Main Memory Segmentation and Paging

Chapter 5 B. Large and Fast: Exploiting Memory Hierarchy

CS399 New Beginnings. Jonathan Walpole

Chapter 33: Virtual Machines

Virtual Machine Monitors (VMMs) are a hot topic in

24-vm.txt Mon Nov 21 22:13: Notes on Virtual Machines , Fall 2011 Carnegie Mellon University Randal E. Bryant.

Intel s Virtualization Extensions (VT-x) So you want to build a hypervisor?

CSCE 410/611: Virtualization

CSE 237B Fall 2009 Virtualization, Security and RTOS. Rajesh Gupta Computer Science and Engineering University of California, San Diego.

Advanced Memory Management

Multiprocessor Support

Virtualization. Pradipta De

Distributed File Systems Issues. NFS (Network File System) AFS: Namespace. The Andrew File System (AFS) Operating Systems 11/19/2012 CSC 256/456 1

Virtualization. Dr. Yingwu Zhu

NUMA replicated pagecache for Linux

OS Virtualization. Why Virtualize? Introduction. Virtualization Basics 12/10/2012. Motivation. Types of Virtualization.

CS510 Operating System Foundations. Jonathan Walpole

CS370 Operating Systems

VIRTUALIZATION: IBM VM/370 AND XEN

VMMS: DISCO AND XEN CS6410. Ken Birman

Distributed Shared Memory and Memory Consistency Models

CS510 Operating System Foundations. Jonathan Walpole

Virtualization. Operating Systems, 2016, Meni Adler, Danny Hendler & Amnon Meisels

Server Virtualization Approaches

Nested Virtualization and Server Consolidation

Lecture 24: Virtual Memory, Multiprocessors

Note Takers: Chau, Bao Kham (cs162-bb) and Quang Tran (cs162-bc) Topic: Real time system

Virtual Memory: From Address Translation to Demand Paging

Virtualization. Virtualization

Address spaces and memory management

Portland State University ECE 587/687. Virtual Memory and Virtualization

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 15: Caching: Demand Paged Virtual Memory

Virtualization. ! Physical Hardware Processors, memory, chipset, I/O devices, etc. Resources often grossly underutilized

Virtualization. Starting Point: A Physical Machine. What is a Virtual Machine? Virtualization Properties. Types of Virtualization

CS533 Concepts of Operating Systems. Jonathan Walpole

Lecture 9: MIMD Architectures

CS-580K/480K Advanced Topics in Cloud Computing. VM Virtualization II

Multiprocessor System. Multiprocessor Systems. Bus Based UMA. Types of Multiprocessors (MPs) Cache Consistency. Bus Based UMA. Chapter 8, 8.

Lecture 7. Xen and the Art of Virtualization. Paul Braham, Boris Dragovic, Keir Fraser et al. 16 November, Advanced Operating Systems

Topic 18: Virtual Memory

references Virtualization services Topics Virtualization

CS370 Operating Systems

Distributed Systems COMP 212. Lecture 18 Othon Michail

I, J A[I][J] / /4 8000/ I, J A(J, I) Chapter 5 Solutions S-3.

Multiprocessor Systems. COMP s1

Chapter 1: Introduction. Operating System Concepts 9 th Edit9on

Computer Architecture Computer Science & Engineering. Chapter 5. Memory Hierachy BK TP.HCM

!! What is virtual memory and when is it useful? !! What is demand paging? !! When should pages in memory be replaced?

Chapter 8. Virtual Memory

Virtual Machines. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

Unit 5: Distributed, Real-Time, and Multimedia Systems

CHAPTER 16 - VIRTUAL MACHINES

Virtual Memory. Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University

Virtual Leverage: Server Consolidation in Open Source Environments. Margaret Lewis Commercial Software Strategist AMD

Chapter 5. Large and Fast: Exploiting Memory Hierarchy

COEN-4730 Computer Architecture Lecture 3 Review of Caches and Virtual Memory

A Review On optimization technique in Server Virtualization

Computer Architecture Lecture 13: Virtual Memory II

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Computer Systems Engineering: Spring Quiz I Solutions

CS252 Spring 2017 Graduate Computer Architecture. Lecture 18: Virtual Machines

Advanced Computer Architecture

CS370 Operating Systems

Last Class. Demand Paged Virtual Memory. Today: Demand Paged Virtual Memory. Demand Paged Virtual Memory

COSC 6385 Computer Architecture. Virtualizing Compute Resources

CS 333 Introduction to Operating Systems. Class 1 - Introduction to OS-related Hardware and Software

Transcription:

CS533 Concepts of Operating Systems Jonathan Walpole

Disco : Running Commodity Operating Systems on Scalable Multiprocessors

Outline Goal Problems and solutions Virtual Machine Monitors(VMM) Disco architecture Disco implementation Experimental results Conclusion

Goal - Low cost development of OS for SMMP hardware - Use existing OS and application code base - Utilize Virtual Machine Monitor (VMM) concepts - Run multiple copies of an OS on a scalable multiprocessor

Problems - Systems software for scalable multi-processors lags far behind the hardware - Extensive custom modifications to OS are needed - Work is implementation intensive and affects reliability - Backwards compatibility is important

Solution - Insert a Virtual Machine Monitor (VMM) between existing OS code and new hardware - The VMM described in this paper is called Disco - Disco is a precursor to VMware

Virtual Machine Monitors - VMM is a software layer - It virtualizes all system resources - It does not abstract resources - It exports a conventional hardware interface - What does that mean? - Many OS instances run concurrently on the same hardware - They think they each have their own real machine - They are protected from each other - They communicate using Internet protocols - But doesn t this approach imply a lot of overhead? - And what s the benefit?

Disco Architecture

Advantages Scalability - Allows use of scalable hardware by multiple non-scalable OS s - A large shared memory multiprocessor looks like a network of smaller machines Fault containment - Even though they are on the same physical hardware they are protected from each other Avoid NUMAness - Non-uniformity of memory can be hidden by the VMM Flexibility - Can run existing OS code unmodified or new specialized OS code

Challenges Overhead - Isn t there a lot of replication of OS code and data? Resource management - Does the underlying VMM have enough information to make good decisions? Communication and sharing - VMMs used to be independent - Now they can use Internet protocols to talk to each other

Disco Implementation The VMM is a concurrent shared memory program Attention given to NUMA and cache-aware data structures - Code segment of disco is replicated in local memory of each processor Communication (via Internet protocols) uses shared memory

Virtual CPU - Disco emulates the execution of each virtual CPU by using direct execution on the real CPU - Disco sets the registers of the real CPU to those of the virtual CPU and jumps to the current PC - The state for each virtual CPU is kept in a data structure (like a process control block) - Each virtual CPU of Disco exports a MIPS R10000 processor

Virtual CPU - Disco runs in privileged mode - All OS code runs in non-privileged mode - So how can OS code execute privileged instructions? - Attempts to execute privileged instructions trap to Disco - Disco executes them on behalf of the OS - Access is restricted to that OS s VM resources

Virtual Physical memory - Each VM has its own physical pages, but they are not necessarily contiguous - Each OS thinks it has access to contiguous physical memory starting at address 0 - Disco keeps track of the mapping between real memory addresses and each OS s physical memory addresses using a pmap structure - When OS tries to insert a virtual-physical address mapping in the TLB, Disco intercepts this (because updating the TLB is privileged) and inserts the real memory address in place of the physical address. - The TLB does the actual address translation at normal speed

Continued.. - In OSs designed for the MIPS processor, kernel memory references bypass the TLB and directly access memory - Kernel runs in physical addressing mode - This would violate VM protection - Need to relink OS code and data to run in virtual addressing mode - Workload execution on top of Disco suffers from increased TLB misses - Switching VMs requires flushing TLB - Switching from application to guest OS requires flushing TLB - A large software TLB can lessen the performance impact

NUMA Memory Management On a cache coherent NUMA machine the system will work correctly regardless of where data is placed in memory. - ideally, cache misses should be satisfied from local memory - Disco implements dynamic page replication and migration to build the illusion of a UMA machine on a NUMA machine Page Migration - Heavily accessed pages by one node are migrated to that node - Disco transparently changes the physical-machine address mapping - Invalidates the TLB entry mapping the old machine page then copies the data to the new, local page

Continued.. Page Replication - For pages that are frequently accessed using reads by multiple nodes - Downgrade the TLB entry of the machine page to read-only and then copy the page to local node and update its TLB entry - Disco maintains a data structure, called memmap, with entries for each real machine memory page

Page Replication Disco uses physical to machine mapping to replicate the pages.virtual page from both cpu of same virtual machine map the same physical page of their virtual machine.disco transparently maps each virtual page to machine page replica that is located local to the node.

Virtual I/O devices - To virtualize I/O devices Disco intercepts all device accesses from a virtual machine and passes them to physical devices - Rather than interposing on traps, Disco requires device drivers to use a special interface that calls Disco Naïve (expensive, but transparent) approach: 1. VM executes instruction to access I/O 2. Trap generated by CPU (based on memory or privilege protection) transfers control to VMM. 3. VMM emulates I/O instruction, saving information about where this came from

Copy on Write Disk Disk reads can be serviced by monitor, if request size is multiple of machine page size, then monitor has to remap the machine pages into VM physical memory. Pages are read only and an attempt to modify will generate copy on write fault handled by monitor. Read only pages are are brought in from disk can be transparently shared between virtual machines.this creates global buffer shared across virtual machine and helps to reduce memory foot prints.

Virtual N/W Interface 1)monitors n/w device remap data page from source machine address to destination machine address. 2)monitor remap the data page from drivers mbuf to client buffer cache.

Execution Overhead Experimented on a uniprocessor, once running IRIX directly on the h/w and once using disco running IRIX in a single virtual machine Overhead of virtualization ranges from 3% - 16%.

Memory Overhead Ran single workload of eight different instances of pmake with six different system configurations Effective sharing of kernel text and buffer cache limits the memory overheads of multiple VM s

Scalability Ran pmake workload under six configurations IRIX Suffers from high synchronization overheads Using a single VM has a high overhead. When increased to 8 VM s execution time reduced to 60%

NUMA Performance of UMA machine determines the lower bound for the execution time of NUMA machine Achieves significant performance improvement by enhancing the memory locality.

Conclusion - Developed system software for scalable shared memory multiprocessors without massive development efforts... and soon after founded VMWare and made lots of money - Results show that overhead of virtualization is modest - Provides solution for NUMA management