Early Experiences with Developing Sorav Bansal IIT Delhi An Optimizing Virtualization Layer.

Slides:



Advertisements
Similar presentations
An Overview Of Virtual Machine Architectures Ross Rosemark.
Advertisements

Virtualisation From the Bottom Up From storage to application.
CS533 Concepts of Operating Systems Class 14 Virtualization and Exokernels.
E Virtual Machines Lecture 3 Memory Virtualization
Antony Jo The University of Montana. Virtualization  The process of abstraction; making something more abstract  Many types: Server Desktop Application.
Virtualization and Cloud Computing
CS533 Concepts of Operating Systems Class 7 Virtualization and Exokernels.
LIFT: A Low-Overhead Practical Information Flow Tracking System for Detecting Security Attacks Feng Qin, Cheng Wang, Zhenmin Li, Ho-seop Kim, Yuanyuan.
Disco Running Commodity Operating Systems on Scalable Multiprocessors.
Cloud Computing and Virtualization Sorav Bansal CloudCamp 2010 IIT Delhi.
Server Virtualization Gina Myers. Definition Creating virtual machines (VMs) “VMs are software entities that emulate a real machine’s functionality” ◦
ELEC6200, Fall 07, Oct 29 Westrom: Virtual Machines 1 Kenneth Westrom ELEC-6620.
The Whats and Whys of Whole System Virtualization Peter A. Dinda Prescience Lab Department of Computer Science Northwestern University
CS533 Concepts of Operating Systems Class 15 Virtualization.
Introduction to Virtual Machines
Virtual Machine Monitors CSE451 Andrew Whitaker. Hardware Virtualization Running multiple operating systems on a single physical machine Examples:  VMWare,
MSWAT: Low-Cost Hardware Fault Detection and Diagnosis for Multicore Systems Siva Kumar Sastry Hari, Man-Lap (Alex) Li, Pradeep Ramachandran, Byn Choi,
Fast Dynamic Binary Translation for the Kernel Piyus Kedia and Sorav Bansal IIT Delhi.
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
A Comparison of Software and Hardware Techniques for x86 Virtualization Keith Adams Ole Agesen Oct. 23, 2006.
CS 149: Operating Systems April 21 Class Meeting
3/11/2002CSE Input/Output Input/Output Control Datapath Memory Processor Input Output Memory Input Output Network Control Datapath Processor.
Microkernels, virtualization, exokernels Tutorial 1 – CSC469.
ICT Day Term 4,  Virtualisation is growing in usage.  Current CPU’s are designed to support Virtualisation.  Businesses are looking at virtualisation.
Virtualization Concepts Presented by: Mariano Diaz.
Xen I/O Overview. Xen is a popular open-source x86 virtual machine monitor – full-virtualization – para-virtualization para-virtualization as a more efficient.
Virtualization Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation is licensed.
Architecture Support for OS CSCI 444/544 Operating Systems Fall 2008.
Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto OS-Related Hardware.
COMS E Cloud Computing and Data Center Networking Sambit Sahu
 Virtual machine systems: simulators for multiple copies of a machine on itself.  Virtual machine (VM): the simulated machine.  Virtual machine monitor.
We are living in a New Virtualized World Sorav Bansal IIT Delhi Feb 26, 2011.
資工系網媒所 NEWS 實驗室 /450 What is Virtualization ? etc Virtualization Running Applications (x-platform) Running Applications (x-platform) Security Sharing Hardware.
Cloud Operating System Unit 09 Cloud OS Core Technology M. C. Chiang Department of Computer Science and Engineering National Sun Yat-sen University Kaohsiung,
Virtual Memory Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University.
Introduction to virtualization
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,
Lecture 12 Virtualization Overview 1 Dec. 1, 2015 Prof. Kyu Ho Park “Understanding Full Virtualization, Paravirtualization, and Hardware Assist”, White.
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,
© 2010 VMware Inc. All rights reserved Introduction to Virtual Machines Carl Waldspurger (SB SM ’89, PhD ’95), VMware R&D.
Running Commodity Operating Systems on Scalable Multiprocessors Edouard Bugnion, Scott Devine and Mendel Rosenblum Presentation by Mark Smith.
E Virtual Machines Lecture 6 Topics in Virtual Machine Management Scott Devine VMware, Inc.
1 Virtualization "Virtualization software makes it possible to run multiple operating systems and multiple applications on the same server at the same.
Virtualization for Cloud Computing
Introduction to Virtualization
Virtualization.
Virtual Machine Monitors
Virtualization Jerry Breecher 19: Virtualization.
Introduction to Operating Systems
L2- Virtualization Technology
Presented by Mike Marty
Lecture 24 Virtual Machine Monitors
Introduction to Operating Systems
OS Virtualization.
A Survey on Virtualization Technologies
Virtual machines benefits
CS533 Concepts of Operating Systems Class 15
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
CS533 Concepts of Operating Systems Class 15
Introduction to Virtual Machines
Co-designed Virtual Machines for Reliable Computer Systems
Introduction to Virtual Machines
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
System Virtualization
CS295: Modern Systems Virtualization
Slides from E0-253 taught by Arkaprava Basu and Vinod Ganapathy
Presentation transcript:

Early Experiences with Developing Sorav Bansal IIT Delhi An Optimizing Virtualization Layer

Virtualization Software VMware Workstation/ESX Server Citrix XenServer Microsoft Hyper-V Virtual Iron Parallels Desktop …

What they do Full-system Emulation Consolidation Sandboxing Live Migration Hardware Fault Tolerance and much more…

How they do, what they do Binary Translation – VMware (1998) Hardware-Assisted Virtualization – VMware, Hyper-V, XenServer, Virtual Iron, … Para-virtualization – XenServer

What they don’t do Optimize code Security Bug-tolerance

What are we doing A virtualization layer for x86 from grounds-up – Runs unmodified OS – Can dynamically optimize code (binary translation) – Can specify security policies enforceable at instruction-level granularity – Can record and replay an execution – Can install on an existing OS – Transparent to user – Simple

Traditional Picture OS Hardware Application 1 Application 2

Virtualized Picture OS Application 1 Application 2 Optimizing VMM

Translation Blocks Divide code into “translation blocks” – A translation block ends if Reach a control-flow instruction Or, MAX_INSNS instructions have been translated

A Simple Scheme Original code fragment Binary Translator x: Translated code fragment tx:

Use a Cache Original code fragment Binary Translator x: Translated code fragment tx: Translation Cache Lookup using xsave found not-found

Direct Jump Chaining a bc d TaTa TbTb TcTc TdTd lookup(b ) lookup(c) lookup(d)

Indirect Jumps a b f call ret TaTa TfTf TbTb lookup(retaddr ) push b jmp T f pop retaddr tmp  JTABLE[retaddr & MASK] if (tmp.src == retaddr) goto tmp.dst

Lower is Better

printf Overheads logarithmic scale

Effect of Maximum Size of Translation Block Max Size of Translation Block

Effect of Translation Cache Size Number of 4k pages in Translation Cache clock random

Optimizations Peephole Optimizations Trace Optimizations Cross-layer optimizations

An Example ld M, r1 ld M, r0 mov r0, r1

Interrupts ld M, r1 ld M, r0 mov r0, r1 Delay Interrupt delivery till end of current translation

Precise Exceptions retld (sp),t0 add $4, sp … jmp t0 Page fault sub $4, sp restore t0 rollback code page fault handler

A Simple Scheme to Prevent Stack-Overflows call ret … push ra, shadow … ra  pop ra1  pop shadow if (ra != ra1) error …

Record-Replay Record – Direct I/O ( in instructions) – Interrupts – Memory-mapped I/O Can use this to tolerate certain classes of bugs

Slowdowns with Record/Replay ProgramSlowdown bubsort216x emptyloop507x euclid320x fibo_iter282x fibo_rec309x hanoi1236x hanoi2182x hanoi3233x printf7x

Conclusions The virtualization layer is a good place to do many interesting things Can we make the virtual machine appear __________________ than the real machine? faster more secure more reliable