Virtualization Technology
Prof D M Dhamdhere
CSE Department
IIT Bombay
Moving towards Virtualization…
Department of Computer Science and Engineering, IIT Bombay
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
What is Virtualization?
• To understand virtualization, let us begin
with a virtual resource
Moving towards Virtualization…
Department of Computer Science and Engineering, IIT Bombay
Virtual Resources
• 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!
Moving towards Virtualization…
Department of Computer Science and Engineering, IIT Bombay
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
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
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
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
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
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
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
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
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
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
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
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
Performing Virtualization
• Full virtualization
– Host machine and guest machine have
identical capabilities
• Ad hoc arrangements may be need to ensure noninterference
• 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
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
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
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
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
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
Descargar

Benefits of virtualization