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

Similar documents
COMPUTER ARCHITECTURE. Virtualization and Memory Hierarchy

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

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

Virtualization and memory hierarchy

Virtualization. Dr. Yingwu Zhu

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

Virtualization. Pradipta De

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

A Survey on Virtualization Technologies

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

Chapter 33: Virtual Machines

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

Chapter 5 B. Large and Fast: Exploiting Memory Hierarchy

Virtual Machines. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

Architectural Support for A More Secure Operating System

COS 318: Operating Systems. Virtual Machine Monitors

Intel VMX technology

Operating Systems CMPSCI 377 Spring Mark Corner University of Massachusetts Amherst

Virtual Machine Systems

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

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

references Virtualization services Topics Virtualization

IT 540 Operating Systems ECE519 Advanced Operating Systems

Virtualization History and Future Trends

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

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

Virtualization. Adam Belay

Chapter 5 C. Virtual machines

Unit 2 : Computer and Operating System Structure

Last 2 Classes: Introduction to Operating Systems & C++ tutorial. Today: OS and Computer Architecture

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

Operating Systems Structure. Otto J. Anshus

CS370 Operating Systems

Concepts. Virtualization

Chap.6 Limited Direct Execution. Dongkun Shin, SKKU

Virtualization. Darren Alton

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

Why use an Operating System? Operating System Definition

Operating Systems Structure and Processes Lars Ailo Bongo Spring 2017 (using slides by Otto J. Anshus University of Tromsø/Oslo)

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

Reserves time on a paper sign-up sheet. Programmer runs his own program. Relays or vacuum tube hardware. Plug board or punch card input.

CSCI 8530 Advanced Operating Systems. Part 19 Virtualization

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

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

Operating Systems and Protection CS 217

Lecture 4: Mechanism of process execution. Mythili Vutukuru IIT Bombay

Process Time. Steven M. Bellovin January 25,

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

Summer 2003 Lecture 27 07/28/03

Introduction to Virtualization

VIRTUALIZATION: IBM VM/370 AND XEN

CS 5460/6460 Operating Systems

Last class: OS and Architecture. OS and Computer Architecture

Last class: OS and Architecture. Chapter 3: Operating-System Structures. OS and Computer Architecture. Common System Components

Role 1: The Operating System is an Abstract Machine. Learning Outcomes. Introduction to Operating Systems. What is an Operating System?

Testing System Virtual Machines

Introduction to Operating Systems

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

Precept 2: Non-preemptive Scheduler. COS 318: Fall 2018

Virtualization. Virtualization

Operating Systems 4/27/2015

Virtualization. Part 1 Concepts & XEN

Introduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras

Fast access ===> use map to find object. HW == SW ===> map is in HW or SW or combo. Extend range ===> longer, hierarchical names

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

A Unix process s address space appears to be three regions of memory: a read-only text region (containing executable code); a read-write region

What are some common categories of system calls? What are common ways of structuring an OS? What are the principles behind OS design and

OPERATING SYSTEM OVERVIEW

COS 318: Operating Systems

DISCO and Virtualization

Distributed Systems COMP 212. Lecture 18 Othon Michail

3. Process Management in xv6

Operating System Control Structures

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

Today s Papers. Virtual Machines Background. Why Virtualize? EECS 262a Advanced Topics in Computer Systems Lecture 19

ECE331: Hardware Organization and Design

Operating Systems. Operating System Structure. Lecture 2 Michael O Boyle

CS 550 Operating Systems Spring Introduction to Virtual Machines

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

Virtual Machine Security

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

Q.1 Explain Computer s Basic Elements

Cloud Computing Virtualization

CS 322 Operating Systems Practice Midterm Questions

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

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

System Virtual Machines

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

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

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

COS 318: Operating Systems

CSC369 Lecture 2. Larry Zhang, September 21, 2015

Faithful Virtualization on a Real-Time Operating System

OS Security IV: Virtualization and Trusted Computing

OS Structure. Hardware protection & privilege levels Control transfer to and from the operating system

Architectural Support for Operating Systems

CS5460: Operating Systems

Operating System. Operating System Overview. Structure of a Computer System. Structure of a Computer System. Structure of a Computer System

Chapter 3 Process Description and Control

message passing model

Transcription:

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 to themselves, but also we give them the illusion that they have an entire machine to themselves. The kernel is a relatively simple piece of software that provides environments, called virtual machines, that look and behave exactly like real machines. Within a virtual machine, since it behaves just like a real machine, one can run a standard operating system, or perhaps a specialized operating system.

The key to the design of a system supporting virtual machines is the distinction between privileged and user modes. When the processor is running in privileged mode, there is no protection of the various system components. Thus if we are trying to isolate the various virtual machines from one another, we cannot allow the virtual machines to have the processor in privileged mode. But, on the other hand, since we want the virtual machine to behave as a real machine does, we must support the execution of privileged instructions, as well as the dichotomy between privileged and user modes, on each virtual machine. The solution is to allow only the virtual machine monitor to run in privileged mode; all other software runs in user mode. However, for each virtual machine, we maintain the concepts of virtual privileged mode and virtual user mode. Whenever a virtual machine is in privileged mode, the virtual machine monitor represents the virtual machine s state as being virtual privileged mode, though the (real) processor is in user mode. When a privileged instruction is executed on a virtual machine, the real processor traps to the virtual machine monitor. The virtual machine monitor will then check the state of the virtual machine: if the virtual machine is in virtual user mode, then this attempt to execute a privileged instruction should result in a trap on the virtual machine. However, if the virtual machine is in virtual privileged mode, then the privileged instruction should be allowed to execute. The instruction is not executed directly the virtual machine monitor must make certain that the effect of executing the instruction applies only to the virtual machine. For example, one virtual machine must not be allowed to start an operation on another virtual machine s virtual disk drive.

This and the next three slides are based on material from the paper: Formal Requirements for Virtualizable Third Generation Architectures, by G. J. Popek and R. P. Goldberg, Communications of the ACM, July 1974, Vol. 17., No. 7.

The photo, from http://old.cs.ncl.ac.uk/events/anniversaries/40th/images/ibm360_672/, is of an IBM 360 Model 67, the first (and only) 360 to support virtual memory. IBM s VM/360 virtual machine monitor ran on it.

When an interrupt or trap occurs, the current state is pushed on the kernel stack. Control is transferred to the location given in the interrupt vector; the particular element is selected by the type of interrupt. When the handler returns, the saved state is popped off the stack and restored, thus returning control to whatever was interrupted. Note: the IBM 360 architecture did not directly support stacks. They has to be implemented explicitly in software. What s in each element of the interrupt vector is a program status word (PSW) that specifies the address of the handler and other information.

A real interrupt or trap occurs, of course, on the real machine. The VMM might determine that it should be handled by a virtual machine, as if the interrupt or trap had happened on that machine. The VMM simulates the interrupt or trap on the virtual machine by causing to happen what happens on the real machine: it saves the current state of the virtual machine on the kernel stack, looks up the interrupt or trap in virtual machine s interrupt vector, then passes control to the virtual machine at that location.