Learning Outcomes. Extended OS. Observations Operating systems provide well defined interfaces. Virtual Machines. Interface Levels

Similar documents
Virtualization. Pradipta De

The Architecture of Virtual Machines Lecture for the Embedded Systems Course CSD, University of Crete (April 29, 2014)

Chapter 5 C. Virtual machines

CS370 Operating Systems

Concepts. Virtualization

The Challenges of X86 Hardware Virtualization. GCC- Virtualization: Rajeev Wankar 36

Virtual Machines. Part 2: starting 19 years ago. Operating Systems In Depth IX 1 Copyright 2018 Thomas W. Doeppner. All rights reserved.

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

COMPUTER ARCHITECTURE. Virtualization and Memory Hierarchy

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

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

CSCI 8530 Advanced Operating Systems. Part 19 Virtualization

Introduction to Virtual Machines. Michael Jantz

Introduction to Virtualization

Virtualization and memory hierarchy

Lecture 4: Extensibility (and finishing virtual machines) CSC 469H1F Fall 2006 Angela Demke Brown

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

Distributed Systems COMP 212. Lecture 18 Othon Michail

Virtualization. Dr. Yingwu Zhu

Introduction to Virtual Machines

A Survey on Virtualization Technologies

Virtual Machines. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

Virtual Machine Systems

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

Virtual machines are an interesting extension of the virtual-memory concept: not only do we give processes the illusion that they have all of memory

CHAPTER 16 - VIRTUAL MACHINES

references Virtualization services Topics Virtualization

Module 1: Virtualization. Types of Interfaces

Spring 2017 :: CSE 506. Introduction to. Virtual Machines. Nima Honarmand

COS 318: Operating Systems. Virtual Machine Monitors

An overview of virtual machine architecture

Virtualization. Part 1 Concepts & XEN

Originally prepared by Lehigh graduate Greg Bosch; last modified April 2016 by B. Davison

Virtualization. Virtualization

CSE 120 Principles of Operating Systems

Lecture 5. KVM for ARM. Christoffer Dall and Jason Nieh. 5 November, Operating Systems Practical. OSP Lecture 5, KVM for ARM 1/42

Operating Systems 4/27/2015

CS370 Operating Systems

Virtual Machines. Virtual Machines

System Virtual Machines

Virtualization. Darren Alton

Introduction to Virtual Machines. Carl Waldspurger (SB SM 89 PhD 95) VMware R&D

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

Mach External pager. IPC Costs. Why the difference? Example of IPC Performance. First generation microkernels were slow Mach, Chorus, Amoeba

Overview of System Virtualization: The most powerful platform for program analysis and system security. Zhiqiang Lin

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

Nested Virtualization and Server Consolidation

System Virtual Machines

Virtualization. Guillaume Urvoy-Keller UNS/I3S

BUD17-301: KVM/ARM Nested Virtualization. Christoffer Dall

CHAPTER 16 - VIRTUAL MACHINES

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

e-pg Pathshala Subject: Computer Science Paper: Cloud Computing Module 23: Virtualization II Module No: CS/CC/23 Quadrant 1 e-text

Virtual machine architecture and KVM analysis D 陳彥霖 B 郭宗倫

Lecture 5: February 3

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

Πποχωπημένη Κατανεμημένη Υπολογιστική

LIA. Large Installation Administration. Virtualization

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

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

Virtual Machines. Part 1: 54 years ago. Operating Systems In Depth VIII 1 Copyright 2018 Thomas W. Doeppner. All rights reserved.

Linux and Xen. Andrea Sarro. andrea.sarro(at)quadrics.it. Linux Kernel Hacking Free Course IV Edition

CS5460: Operating Systems. Lecture: Virtualization. Anton Burtsev March, 2013

Dynamic Translator-Based Virtualization

Virtual Machine Monitors (VMMs) are a hot topic in

Virtual Machine Monitors!

VIRTUALIZATION. Dresden, 2011/12/6. Julian Stecklina

NON SCHOLAE, SED VITAE

What is a VM? Categories of Virtual Machines. Process Virtual Machine 11/17/2010

Virtualization History and Future Trends

Virtual Machine Security

CSCE 410/611: Virtualization!

VIRTUALIZATION: IBM VM/370 AND XEN

Advanced Operating Systems (CS 202) Virtualization

CSE543 - Computer and Network Security Module: Virtualization

1 Virtualization Recap

High-Level Language VMs

Virtualization (II) SPD Course 17/03/2010 Massimo Coppola

Cloud Computing Virtualization

Operating System: Chap2 OS Structure. National Tsing-Hua University 2016, Fall Semester

Virtualization. Adam Belay

CS 5600 Computer Systems. Lecture 11: Virtual Machine Monitors

MANAGEMENT OF TASKS IN VIRTUALIZED ENVIRONMENTS

Intel VMX technology

CSE Computer Security

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

LINUX Virtualization. Running other code under LINUX

Multiprocessor Scheduling. Multiprocessor Scheduling

CSCE 410/611: Virtualization

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

DISCO and Virtualization

Mechanisms and constructs for System Virtualization

CSE543 - Computer and Network Security Module: Virtualization

How it can help your organisation

Chapter 5 B. Large and Fast: Exploiting Memory Hierarchy

Björn Döbel. Microkernel-Based Operating Systems. Exercise 3: Virtualization

COLORADO, USA; 2 Usov Aleksey Yevgenyevich - Technical Architect, RUSSIAN GOVT INSURANCE, MOSCOW; 3 Kropachev Artemii Vasilyevich Manager,

Faculty of Computer Science Institute for System Architecture, Operating Systems Group. Virtualization. Henning Schild. Dresden,

CS 550 Operating Systems Spring Introduction to Virtual Machines

Advanced Operating Systems

Transcription:

Learning Outcomes Extended OS An appreciation that the abstract interface to the system can be at different levels. Virtual machine monitors (VMMs) provide a lowlevel interface An understanding of trap and emulate Knowledge of the difference between type 1 (native) and type 2 VMMs (hosted) Virtual Machines References: Smith, J.E.; Ravi Nair;, "The architecture of virtual machines," Computer, vol.38, no.5, pp. 32-38, May 2005 Chapter 7 7.3 Textbook Modern Operating Systems, 4 th ed. All of chapter 7, if you re interested. Observations Operating systems provide well defined interfaces Abstract hardware details Simplify Enable portability across hardware differences Hardware instruction set architectures are another will defined interface Example AMD and Intel both implement (mostly) the same ISA Software can run on both Interface Levels Instruction Set Architecture Interface between software and hardware label 3 + 4 Divided between privileged and unprivileged parts Privileged a superset of the un-privileged 1

Application Binary Interface Interface between programs hardware + OS Label 2+4 Consists of system call interface + unprivileged ISA Application Programming Interface Interface between high-level language libraries + hardware + OS Consists of library calls + unprivileged ISA Syscalls usually called through library. Portable via re-compilation to other systems supporting API or dynamic linking Some Interface Goals Support deploying software across all computing platforms. E.g. software distribution across the Internet Provide a platform to securely share hardware resources. E.g. cloud computing OS is an extended virtual machine Multiplexes the machine between applications Time sharing, multitasking, batching Provided a higher-level machine for Ease of use Portability Efficiency Security Etc. Abstraction versus Virtualisation Process versus System Virtual Machine 2

JAVA Higher-level Virtual Machine write a program once, and run it anywhere Architecture independent Operating System independent Language itself was clean, robust, garbage collection Program compiled into bytecode Interpreted or just-in-time compiled. Lower than native performance Comparing Conventional code execution versus Emulation/Translation Aside: Just In-Time compilation (JIT) JAVA and the Interface Goals Support deploying software across all computing platforms. Provide a platform to securely share hardware resources. Issues Legacy applications No isolation nor resource management between applets Security Trust JVM implementation? Trust underlying OS? Performance compared to native? Is the OS the right level of extended machine? Security Trust the underlying OS? Legacy application and OSs Resource management of existing systems suitable for all applications? Performance isolation? What about activities requiring root privileges 3

Virtual Machine Monitors Also termed a hypervisor Provide scheduling and resource management Extended machine is the actual machine interface. IBM VM/370 CMS a light-weight, single-user OS VM/370 multiplex multiple copies of CMS Legacy OSes (and applications) Legacy hardware Server consolidation Cost saving Power saving Server migration Concurrent OSes Linux Windows Primary Backup High availability Advantages Test and Development Security VMM (hopefully) small and correct Performance near bare hardware For some applications Native (Type 1) vs. Hosted (Type 2) VM1 VM2 VM1 App VM2 Host Operating System Type 1 (Native) Type 2 (Hosted) (VMM) runs in most privileged mode of processor Manage hardware directly Also termed classic, baremetal, native runs in non-privileged mode implements a virtual kernel-mode/virtual user-mode Hardware provides three privilege levels (e.g. Intel VT-x) What happens when guest OS executes native privileged instructions? VM1 VM2 runs as user-mode process above the privileged host OS Also termed hosted hypervisor Again, provides a virtual kernelmode and virtual user-mode Can leverage device support of existing host OS. What happens when guest OS execute privileged instructions? VM1 App VM2 Host Operating System 4

Hosted Details Gerald J. Popek and Robert P. Goldberg (1974). "Formal Requirements for Virtualizable Third Generation Architectures". Communications of the ACM 17 (7): 412 421. Jeremy Sugerman, Ganesh Venkitachalam and Beng-Hong Lim, Virtualizing I/O Devices on VMware Workstation's Hosted Virtual Machine Monitor, USENIX ATC 2001 application installs driver (part of the hypervisor) into the Driver intercepts hypervisor related activities from Hyp. App. It world switches when guest OS needs to runs Unloads state from processor Loads hypervisor state and gives it control of machine world switches when Host OS is needed Regularly to allow interactivity with. When hypervisor needs service (e.g. file system) Host World App Hyp. Driver VM World Sensitive Instructions The instructions that attempt to change the configuration of the processor. The instructions whose behaviour or result depends on the configuration of the processor. Privileged Instructions Instructions that trap if the processor is in user mode and do not trap if it is in system mode. Theorem Architecture is virtualisable if sensitive instructions are a subset of privileged instructions. Approach: Trap & Emulate? Example: mtc0/mfc0 MIPS mfc0: load a value in the system coprocessor Can be used to observer processor configuration mtc0: store a value in the system coprocessor Can be used to change processor configuration Example: disable interrupts mfc0 r1, C0_Status andi r1, r1, CST_IEc mtc0 r1, C0_Status Sensitive? Privileged? Example: cli/sti x86 CLI: clear interrupt flag Disable interrupts STI: set interrupt flags Enable interrupts Sensitive? Privileged? X86 POPF Pop top of stack and store in EFLAGS register IF bit disables interrupts 5

X86 POPF Is not privileged (does not trap) In kernel mode enable/disables interrupts In user-mode silently ignored POPF is not virtualisable X86 (pre VT extensions) is not virtualisable Taxonomy of Virtual Machines What is System/161? 6