SymCall: Symbiotic Virtualization Through VMM-to-Guest Upcalls John R. Lange and Peter Dinda University of Pittsburgh (CS) Northwestern University (EECS)

Slides:



Advertisements
Similar presentations
XEN AND THE ART OF VIRTUALIZATION Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauer, lan Pratt, Andrew Warfield.
Advertisements

Minimal-overhead Virtualization of a Large Scale Supercomputer John R. Lange and Kevin Pedretti, Peter Dinda, Chang Bae, Patrick Bridges, Philip Soltero,
Bart Miller. Outline Definition and goals Paravirtualization System Architecture The Virtual Machine Interface Memory Management CPU Device I/O Network,
Presented By Srinivas Sundaravaradan. MACH µ-Kernel system based on message passing Over 5000 cycles to transfer a short message Buffering IPC L3 Similar.
Architectural Support for OS March 29, 2000 Instructor: Gary Kimura Slides courtesy of Hank Levy.
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
G Robert Grimm New York University Disco.
Home: Phones OFF Please Unix Kernel Parminder Singh Kang Home:
OS Spring’03 Introduction Operating Systems Spring 2003.
Advanced OS Chapter 3p2 Sections 3.4 / 3.5. Interrupts These enable software to respond to signals from hardware. The set of instructions to be executed.
CS533 Concepts of Operating Systems Class 3 Integrated Task and Stack Management.
November 1, 2004Introduction to Computer Security ©2004 Matt Bishop Slide #29-1 Chapter 33: Virtual Machines Virtual Machine Structure Virtual Machine.
Operating System Support for Virtual Machines Sam King George Dunlap Peter Chen CoVirt Project, University of Michigan.
Virtual Machine Monitors CSE451 Andrew Whitaker. Hardware Virtualization Running multiple operating systems on a single physical machine Examples:  VMWare,
Basics of Operating Systems March 4, 2001 Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard.
Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.
Tanenbaum 8.3 See references
Symbiotic Virtualization John R. Lange Thesis Proposal Department of Electrical Engineering and Computer Science Northwestern University June 2009.
Memory Management in Windows and Linux &. Windows Memory Management Virtual memory manager (VMM) –Executive component responsible for managing memory.
Zen and the Art of Virtualization Paul Barham, et al. University of Cambridge, Microsoft Research Cambridge Published by ACM SOSP’03 Presented by Tina.
Symbiotic Virtualization John R. Lange Ph.D. Final Defense Department of Electrical Engineering and Computer Science Northwestern University August 9,
Dual Stack Virtualization: Consolidating HPC and commodity workloads in the cloud Brian Kocoloski, Jiannan Ouyang, Jack Lange University of Pittsburgh.
Disco : Running commodity operating system on scalable multiprocessor Edouard et al. Presented by Jonathan Walpole (based on a slide set from Vidhya Sivasankaran)
CS533 Concepts of Operating Systems Jonathan Walpole.
CS533 Concepts of Operating Systems Jonathan Walpole.
Operating System Support for Virtual Machines Samuel T. King, George W. Dunlap,Peter M.Chen Presented By, Rajesh 1 References [1] Virtual Machines: Supporting.
Virtualization Concepts Presented by: Mariano Diaz.
Benefits: Increased server utilization Reduced IT TCO Improved IT agility.
Operating System Support for Virtual Machines Sam King George Dunlap Peter Chen CoVirt Project, University of Michigan.
Xen I/O Overview. Xen is a popular open-source x86 virtual machine monitor – full-virtualization – para-virtualization para-virtualization as a more efficient.
Three fundamental concepts in computer security: Reference Monitors: An access control concept that refers to an abstract machine that mediates all accesses.
Xen I/O Overview.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto OS-Related Hardware.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
CS533 Concepts of Operating Systems Jonathan Walpole.
Introduction to the Palacios VMM and the V3Vee Project John R. Lange Department of Computer Science University of Pittsburgh September 28th, 2010.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming  To allocate scarce memory resources.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Computers Operating System Essentials. Operating Systems PROGRAM HARDWARE OPERATING SYSTEM.
Disco : Running commodity operating system on scalable multiprocessor Edouard et al. Presented by Vidhya Sivasankaran.
Architecting a Symbiotic Virtual Machine Monitor for Scalable High Performance Computing John R. Lange Department of Electrical Engineering and Computer.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming.  To allocate scarce memory.
ELI: Bare-Metal Performance for I/O Virtualization 林孟諭 Dept. of Electrical Engineering National Cheng Kung University Tainan, Taiwan, R.O.C.
Operating Systems Security
Full and Para Virtualization
Lecture 26 Virtual Machine Monitors. Virtual Machines Goal: run an guest OS over an host OS Who has done this? Why might it be useful? Examples: Vmware,
Protection of Processes Security and privacy of data is challenging currently. Protecting information – Not limited to hardware. – Depends on innovation.
CSE 451: Operating Systems Winter 2015 Module 25 Virtual Machine Monitors Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
Concepts and Structures. Main difficulties with OS design synchronization ensure a program waiting for an I/O device receives the signal mutual exclusion.
1.1 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 1: Introduction What Operating Systems Do √ Computer-System Organization.
Introduction to Operating Systems Concepts
Virtualization.
Virtual Machine Monitors
Introduction to Operating Systems
Xen and the Art of Virtualization
Presented by Yoon-Soo Lee
Lecture 24 Virtual Machine Monitors
OS Virtualization.
Operating System Support for Virtual Machines
Outline Module 1 and 2 dealt with processes, scheduling and synchronization Next two modules will deal with memory and storage Processes require data to.
Chapter 33: Virtual Machines
Architectural Support for OS
The Design & Implementation of Hyperupcalls
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
Architectural Support for OS
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
System Virtualization
CS295: Modern Systems Virtualization
Chapter 33: Virtual Machines
Presentation transcript:

SymCall: Symbiotic Virtualization Through VMM-to-Guest Upcalls John R. Lange and Peter Dinda University of Pittsburgh (CS) Northwestern University (EECS) March 11 th, 2011

2 Summary Virtualization can scale – Near native performance for optimized VMM/guest (within 3%) VMM needs to know about guest internals – Should modify behavior for each guest environment – Example: Paging method to use depends on guest Black Box inference is not desirable in HPC environment – Unacceptable performance overhead – Convergence time – Mistakes have large consequences Need guest cooperation – Guest and VMM relationship should be symbiotic

Outline Semantic Gap – VM introspection is hard Symbiotic Virtualization – Specifically design VMM/OS to maximize information sharing SymCall – Synchronous upcalls into a running VM SwapBypass – Transparently increase guest memory space

4 Semantic Gap VMM architectures are designed as black boxes – Explicit OS interface (hardware or paravirtual) – Internal OS state is not exposed to the VMM Many uses for internal state – Performance, security, etc... – VMM must recreate that state “Bridging the Semantic Gap” – [Chen: HotOS 2001] Two existing approaches: Black Box and Gray Box – Black Box: Monitor external guest interactions – Gray Box: Reverse engineer internal guest state – Examples Virtuoso Project Lycosid, Antfarm, Geiger, IBMon, many others

5 Example: Swapping Physical Memory Swapped Memory Application Memory Working Set Swap Disk Disk storage for expanding physical memory Only basic knowledge without internal state Guest VMM

6 Symbiotic Virtualization Bridging the semantic gap is hard – Can we design a virtual machine interface with no gap? Symbiotic Virtualization – Design both guest OS and VMM to minimize semantic gap – 2 components Guest OS provides internal state to VMM Guest OS services requests from VMM – Interfaces are optional

7 Symbiotic Interfaces SymSpy Passive Interface – Internal state already exists but it is hidden – Asynchronous bi-directional communication via shared memory – Structured state information that is easily parsed Semantically rich SymCall Functional Interface – Synchronous upcalls into guest during exit handling – API Function call in VMM System call in Guest – Brand new interface construct

8 Symbiotic Discovery A symbiotic OS must run on real hardware – Interface must be based on hardware features CPUID – Detection of Symbiotic VMM MSRs – Configuration of Symbiotic interfaces

9 SymSpy Shared memory page between OS and VMM – OS uses MSR to map into address space Standardized data structures – Shared state information Read and write without exits

10 SymCall (Symbiotic Upcalls) Conceptually similar to System Calls – System Calls: Application requests OS services – Symbiotic Upcalls: VMM requests OS services Designed to be architecturally similar – Virtual hardware interface Superset of System Call MSRs – Internal OS implementation Share same system call data structures and basic operations Guest OS configures a special execution context – VMM instantiates that context to execute synchronous upcall – Symcalls exit via a dedicated hypercall

11 SymCall environment Specified in virtual SYMCALL MSRs – Based on System Call MSRs – VMM copies values into hardware control registers SYMCALL MSRs – SYMCALL_RIP Global code entry point for all symcalls – SYMCALL_RSP Stack frame used by SymCall – SYMCALL_CS (+SS) Code segment and Stack segment used for SymCall Enables kernel mode execution – SYMCALL_GS and SYMCALL_FS Special segments that point to per CPU data structures

12 SymCall Control Flow Handle exit

13 Existing Implementation Symbiotic Linux guest OS – Exports SymSpy and SymCall interfaces Palacios – Fairly significant modifications to enable nested VM entries Re-entrant exit handlers Serialize subset of guest state out of global hardware structures

14 Restrictions Currently designed for short queries – Narrow focus allows behavioral guarantees Restrictions: – Only 1 symcall active at a time – Symcalls run to completion No blocking – Blocking would allow asynchronous behavior No context switches No injected exceptions or interrupts – Symcalls cannot wait on locks Waiting would make deadlocks possible

15 Example: SwapBypass Purpose: prevent thrashing situations – Temporarily expand guest memory – Completely bypass the Linux swap subsystem Enabled by SymCall – Not feasible without symbiotic interfaces VMM detects guest thrashing – Shadow page tables used to prevent it

16 Symbiotic Shadow Page tables Guest Page TablesShadow Page Tables PDEPTE Physical Memory PDEPTE Physical Memory Swap Disk Cache Swapped out pageSwap Bypass Page

17 Guest 3 Global Swap Disk Cache Guest 1 SwapBypass Concept Guest Physical Memory Swapped Memory Swap Disk Application Working Set VMM physical Memory Swap Disk Guest 2 Guest 3

18 Necessary SymCall: query_vaddr() 1.Get current process ID – get_current(); (Internal Linux API) 2.Determine presence in Linux swap cache – find_get_page(); (Internal Linux API) 3.Determine page permissions for virtual address – find_vma(); (Internal Linux API) Information extremely hard to get otherwise

19 Evaluation Memory system microbenchmarks – Stream, GUPS, ECT Memperf – Configured to overcommit anonymous memory Cause thrashing in the guest OS Overhead isolated to swap subsystem – Ideal swap device implemented as RAM disk IO occurs at main memory speeds Provides lower bound for performance gains

20 Stream Runtime Working set size Ideal swap cache improvement

Conclusion Palacios: V3VEE Project:

22 System Calls Entry points into Kernel – Provides privileged services for applications Device IO, address space modifications, etc… Extensive hardware support – Fast entry to preconfigured execution state Switch from user mode to kernel mode Kernel specifies execution environment to hardware – Model Specific Registers (MSRs) – Special instructions for kernel entry/exit SYSENTER and SYSEXIT SYSCALL and SYSRET