Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards...
-
Upload
caroline-charles -
Category
Documents
-
view
220 -
download
0
Transcript of Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards...
![Page 1: Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.](https://reader030.fdocuments.in/reader030/viewer/2022032705/56649dd45503460f94acc588/html5/thumbnails/1.jpg)
Virtualization Technology
Prof D M DhamdhereCSE Department
IIT Bombay
Moving towards Virtualization…
Department of Computer Science and Engineering, IIT Bombay
![Page 2: Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.](https://reader030.fdocuments.in/reader030/viewer/2022032705/56649dd45503460f94acc588/html5/thumbnails/2.jpg)
Some Benefits of Virtualization
• Server consolidation– Also called workload consolidation
• Better security and reliability for applications using same host
• Testing of software concurrently with production use of a host
• Disaster management
Moving towards Virtualization…
Department of Computer Science and Engineering, IIT Bombay
![Page 3: Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.](https://reader030.fdocuments.in/reader030/viewer/2022032705/56649dd45503460f94acc588/html5/thumbnails/3.jpg)
What is Virtualization?
Moving towards Virtualization…
Department of Computer Science and Engineering, IIT Bombay
• To understand virtualization, let us begin with a virtual resource
![Page 4: Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.](https://reader030.fdocuments.in/reader030/viewer/2022032705/56649dd45503460f94acc588/html5/thumbnails/4.jpg)
Virtual Resources
Moving towards Virtualization…
Department of Computer Science and Engineering, IIT Bombay
• Definition– Illusion of a resource, supported by an OS
through use of a real resource
• Motivation– To have more number of resources available– To have more of a resource available, e.g.,
virtual memory
• Historical– The concept originated in 1960s!
![Page 5: Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.](https://reader030.fdocuments.in/reader030/viewer/2022032705/56649dd45503460f94acc588/html5/thumbnails/5.jpg)
Virtual Resources
• A virtual resource is an abstraction
• The OS implements the abstraction through use of real resources
• The implementation can be changed without affecting the application using the virtual resource
• An application can be migrated to any host offering the same abstraction—portability
Moving towards Virtualization…
Department of Computer Science and Engineering, IIT Bombay
![Page 6: Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.](https://reader030.fdocuments.in/reader030/viewer/2022032705/56649dd45503460f94acc588/html5/thumbnails/6.jpg)
Virtual Resources
• Use of virtual resources started with I/O devices– Motivation: Have more I/O devices available– Each user could have own I/O device
• Then came virtual memory– Motivation: Have larger memory
• And then .. Virtual machines– Motivation?
Moving towards Virtualization…
Department of Computer Science and Engineering, IIT Bombay
![Page 7: Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.](https://reader030.fdocuments.in/reader030/viewer/2022032705/56649dd45503460f94acc588/html5/thumbnails/7.jpg)
Virtual Machines
• Motivation: Provide a machine to each user so that a user could use an OS of own choice
Moving towards Virtualization…
Department of Computer Science and Engineering, IIT Bombay
![Page 8: Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.](https://reader030.fdocuments.in/reader030/viewer/2022032705/56649dd45503460f94acc588/html5/thumbnails/8.jpg)
Virtual Machines
• A virtual machine could be used in other contexts as well …– Motivation?
• Since it is an abstraction, it can be made to have desirable properties, e.g., simplicity
– Some programming languages have their own virtual machines, e.g., Pascal, Java
• If implemented on several hosts, it provides portability
Moving towards Virtualization…
Department of Computer Science and Engineering, IIT Bombay
![Page 9: Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.](https://reader030.fdocuments.in/reader030/viewer/2022032705/56649dd45503460f94acc588/html5/thumbnails/9.jpg)
What is Virtualization?
• Definition:
Virtualization is the process of mapping the resources and interfaces of a virtual resource into the resources and interfaces of a host machine.
• Issues in virtualization• Complexity• Correctness—includes reliability, security …• Performance! (overhead of the mapping)
Moving towards Virtualization…
Department of Computer Science and Engineering, IIT Bombay
![Page 10: Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.](https://reader030.fdocuments.in/reader030/viewer/2022032705/56649dd45503460f94acc588/html5/thumbnails/10.jpg)
Overview of Virtualization
• Virtual device virtualization– Map an operation on a virtual resource into an
operation of a real resource, e.g. virtual disks• Could be achieved through minimal overhead• OS may map several virtual devices into same real
device
• Virtual memory virtualization– Virtual memory manager maps parts of the
virtual memory into real memory• Overhead: loading and removal of pages
Moving towards Virtualization…
Department of Computer Science and Engineering, IIT Bombay
![Page 11: Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.](https://reader030.fdocuments.in/reader030/viewer/2022032705/56649dd45503460f94acc588/html5/thumbnails/11.jpg)
Overview of Virtualization
• Virtual machine virtualization– Application ‘running under’ a virtual machine
executes an instruction of the virtual machine (we call it the guest machine)
– The actual operation should be implemented through execution of instructions of the real machine (we call it the host machine)
– It should incur minimal overhead• Hence it should be achieved through minimal
interpretation
Moving towards Virtualization…
Department of Computer Science and Engineering, IIT Bombay
![Page 12: Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.](https://reader030.fdocuments.in/reader030/viewer/2022032705/56649dd45503460f94acc588/html5/thumbnails/12.jpg)
Overview of Virtualization
• Who performs virtualization of virtual machines?– A virtual machine operating system (VM OS)– A virtual machine monitor (VMM)
• Also called a hypervisor• Not a full-fledged operating system
Moving towards Virtualization…
Department of Computer Science and Engineering, IIT Bombay
![Page 13: Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.](https://reader030.fdocuments.in/reader030/viewer/2022032705/56649dd45503460f94acc588/html5/thumbnails/13.jpg)
Overview of Virtualization
• VM/370– Provides virtual machines that have a subset
of the capabilities of the real machine– Implements a virtual machine through
virtualization• Low overhead: Does not interpret each instruction• Lets an application’s code execute on the real
machine most of the time
– Multiplexes various virtual machines• Overlaps their operation so that each virtual
machine receives a fair opportunity to operate
Moving towards Virtualization…
Department of Computer Science and Engineering, IIT Bombay
![Page 14: Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.](https://reader030.fdocuments.in/reader030/viewer/2022032705/56649dd45503460f94acc588/html5/thumbnails/14.jpg)
Overview of Virtualization
• VM/370– ‘Schedules’ a virtual machine– Makes arrangement to regain control at
critical times– Issue: Ensure non-interference between
virtual machines
Moving towards Virtualization…
Department of Computer Science and Engineering, IIT Bombay
![Page 15: Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.](https://reader030.fdocuments.in/reader030/viewer/2022032705/56649dd45503460f94acc588/html5/thumbnails/15.jpg)
Overview of Virtualization
• VM/370– Ensures non-interference
• Does not allow a virtual machine’s OS (i.e, guest OS) to execute privileged instructions
• Runs the guest OS in ‘user mode’ of CPU– Drawback: loses the distinction between a
guest OS and an application running under a guest OS
Moving towards Virtualization…
Department of Computer Science and Engineering, IIT Bombay
![Page 16: Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.](https://reader030.fdocuments.in/reader030/viewer/2022032705/56649dd45503460f94acc588/html5/thumbnails/16.jpg)
Overview of Virtualization
• VM/370– How does it control overhead?
• Allows a virtual machine to use instructions of the CPU directly during its operation
– No overhead at such times– OS of the guest machine is in control
• Interrupts occurring during guest OS operation can be handled directly by the guest OS
Moving towards Virtualization…
Department of Computer Science and Engineering, IIT Bombay
![Page 17: Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.](https://reader030.fdocuments.in/reader030/viewer/2022032705/56649dd45503460f94acc588/html5/thumbnails/17.jpg)
Performing Virtualization
• Full virtualization– Host machine and guest machine have
identical capabilities• Ad hoc arrangements may be need to ensure non-
interference
• Paravirtualization– Some host machine instructions are not
virtualized; their use is replaced by use of other instructions
Moving towards Virtualization…
Department of Computer Science and Engineering, IIT Bombay
![Page 18: Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.](https://reader030.fdocuments.in/reader030/viewer/2022032705/56649dd45503460f94acc588/html5/thumbnails/18.jpg)
Performing Virtualization
• Paravirtualization (contd)– Achieved in two ways
• Port a guest OS to work under a VM OS or VMM– Replaces use of nonvirtualized instructions by
other instructions while ‘installing’ a guest OS• Perform dynamic binary translation
– Perform substitutions of nonvirtualized instructions during operation
– Allows a guest OS to be used readily
Moving towards Virtualization…
Department of Computer Science and Engineering, IIT Bombay
![Page 19: Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.](https://reader030.fdocuments.in/reader030/viewer/2022032705/56649dd45503460f94acc588/html5/thumbnails/19.jpg)
Supporting Virtualization
• Hardware features– Provide more CPU modes
• Prevents interference by letting host OS, guest OS and application use different CPU modes
– Provide easily virtualizable features
Moving towards Virtualization…
Department of Computer Science and Engineering, IIT Bombay
![Page 20: Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.](https://reader030.fdocuments.in/reader030/viewer/2022032705/56649dd45503460f94acc588/html5/thumbnails/20.jpg)
Supporting Virtualization
• Software support– Ensure noninterference– Provide performance isolation– Reduce overhead
• Replace control transitions of the kind ‘application → host OS → guest OS’ by ‘application → host OS’
• Replace data transfers ‘application → guest OS → host OS → device’ by ‘application → .. device’
Moving towards Virtualization…
Department of Computer Science and Engineering, IIT Bombay
![Page 21: Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.](https://reader030.fdocuments.in/reader030/viewer/2022032705/56649dd45503460f94acc588/html5/thumbnails/21.jpg)
Benefits of Virtualization Revisited
• Workload consolidation– Create several virtual machines on a host
• Security and reliability of applications– Create a virtual machine for each application
• Test an application concurrently with production use of a host– Use separate virtual machines
• Disaster management– Port a virtual machine
Moving towards Virtualization…
Department of Computer Science and Engineering, IIT Bombay
![Page 22: Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.](https://reader030.fdocuments.in/reader030/viewer/2022032705/56649dd45503460f94acc588/html5/thumbnails/22.jpg)
References
These slides are based primarily on Chapter 4 of
the book:
Operating Systems—A Concept-Based Approach,
D. M. Dhamdhere, McGraw-Hill, 2008
Moving towards Virtualization…
Department of Computer Science and Engineering, IIT Bombay