The Codex of Business Writing Software for Real-World Solutions 2.pptx
Â
Virtual machines and their architecture
1. SREENIDHI INSTITUTE OF SCIENCE AND TECHNOLOGY
(Autonomous Institution, approved by UGC and Accredited by NAAC with âAâ Grade)
TECHNICAL SEMINAR
Presented byâŚ
Mrinmoy Dalal
CSE A (13311A0506)
2. Can a âsmallâ operating system simulate the
hardware of some machine so that:
⢠Another operating system can run in that
simulated hardware?
⢠More than one instance of that operating
system run on the same hardware at the
same time?
⢠More than one different operating system can
share the same hardware at the same time?
Question
4. VIRTUALIZATION
⢠Virtualization is an abstraction layer that decouples the physical
hardware from the operating system to deliver greater IT resource
utilization and flexibility.
⢠It allows multiple virtual machines, with heterogeneous operating
systems to run in isolation, side-by-side on the same physical
machine.
⢠Virtualization hides the physical characteristics of computing
resources from their users, be they applications, or end users.
6. HYPERVISOR
⢠Hypervisor is a software program that
manages multiple operating systems (or
multiple instances of the same operating
system) on a single computer system.
⢠The hypervisor manages the system's
processor, memory, and other resources to
allocate what each operating system requires.
⢠Hypervisors are designed for a particular
processor architecture and may also be called
Virtualization managers.
8. âA machine is a
tool that consists
of one or more
parts, and uses
energy to achieve
a particular goal.â
-WIKIPEDIA
9. âA virtual machine (VM) is a
simulation of a machine (abstract
or real) that is usually different
from the target machine (where it
is being simulated on).â
-WIKIPEDIA
10. ⢠The resources of the physical
computer are shared to create
the virtual machines
â CPU scheduling can create the
appearance that each user has own
processor
â Spooling and a file system provide
⢠virtual card readers, virtual line printers
â Disk partitioned to provide virtual
disks
â A normal user time-sharing terminal
serves as the virtual machine
operatorâs console
12. ⢠Virtual-machine concept provides complete protection of
system resources
â Each virtual machine is isolated from all other virtual machines.
â However, no direct sharing of resources
⢠Virtual-machine system is a good vehicle for operating-
systems research and development.
â System development is done on the virtual machine does not
disrupt normal operation
â Multiple concurrent developers can work at same time
⢠The virtual machine concept is difficult to implement due
to the effort required to provide an exact duplicate to the
simulated machine
13. VM COMPATIBILITY
â Hardware Independent
⢠Physical hardware hidden by the
virtualization layer.
â Create Once, Run Anywhere
⢠No Configuration Issues
⢠Migrate VMs between Hosts
â Legacy VMs
⢠Run Ancient OS on new platform
⢠Eg: DOS
14. EXAMPLE â PAGE TABLES
⢠Suppose guest OS has its own page tables Then virtualization layer
must
â Copy those tables to its own
â Trap every reference or update to tables and simulate it
⢠During page fault
â Virtualization layer must decide whether fault belongs to guest OS or self
â If guest OS, must simulate a page fault
⢠Likewise, virtualization layer must trap and simulate every privileged
instruction in machine!
15. ⢠Some hardware architectures or features are impossible to
virtualize
â Certain registers or state not exposed
â Unusual devices and device control
â Clocks, time, and real-time behavior
16. VIRTUAL MACHINE MONITOR
⢠Virtual machine monitor (VMM) or
hypervisor is software that supports
VMs. It determines how to map
virtual resources to physical ones
⢠Physical resource may be time-
shared, partitioned, or emulated in
software.
⢠VMM much smaller than a traditional
OS (Isolation portion of a VMM is ďť 10,000
lines of code),
17. MAIN CONCERN OF VMM
⢠Biggest problem faced by the VMM is to present the
hardware to the VM in a âsafe, transparent and efficient
wayâ
⢠Safe: whatever the VM does, it should not be able to affect
other VMâs or the VMM
⢠Maintain illusion by tricking the software into thinking it has
the hardware to itself and by hiding the true state of the
hardware
18. ATTRIBUTES OF VMM
⢠Encapsulation
â VMM manages both software and
hardware thus giving it the ability to
manage the hardware resources as well
as manipulate and control software stack
⢠Performance
â Overhead is generally transparent for
most workloads, only slowdowns occur
for isolation or maintain the transparent
illusion of hardware usage levels
20. Types Of Virtual Machines
Hardware-level virtualization
Operating system-level
High-level language virtual
machines
21. HARDWARE LEVEL VIRTUALIZATION
⢠Virtualization layer sits right on top
of the real hardware
⢠Since the VM presents a version the
real machine, all software written
for that hardware (x86) will run on
that virtual machine
⢠Original design from IBM in the
1960âs
22. OPERATING SYSTEM LEVEL VIRTUALIZATION
⢠Virtualization layer sit between
the operating system and the
application programs that run on
the operating system
⢠Virtual Machine runs applications,
or sets of applications written for
the operating system but in a
controlled environment
âuse host OS API
Real Machine
OS
VMM
Virtual Machine
Application
Applications
23. HIGH-LEVEL LANGUAGE VIRTUAL MACHINES
⢠The virtualization layer sits as an
application program on top of
the operating system
⢠Can run any programs written
for that virtual machine
abstraction regardless of the
operating system hosting that
virtual machine
⢠Anyone have an example of
this?
Real Machine
OS
JVM
Java Byte Code
Applications
-Java
25. ATTRIBUTES OF ALL VIRTUAL MACHINES (1)
⢠Software Compatibility
â VM provides compatible abstraction so all software written for the
machine that VM is virtualizing will run on it
â Java: âwrite once, run anywhereâ
⢠Isolation
â All software running on the virtual machine is contained within it
and canât affect other VMâs or processes
26. ATTRIBUTES OF ALL VIRTUAL MACHINES (2)
⢠Encapsulation
â Virtual machines provide a level of indirection. Any software running within
them can be controlled and manipulated.
â Can act like putting a filter on a print service to monitor content or perform
additional book keeping.
⢠Java VM for example can perform run time error checking and garbage collection that
C++ compiled code canât do running directly on the hardware
⢠Performance
â Any new software layer adds overhead to system
27. IMPORTANT USES OF VMs (1)
1. Multiple OSes
⢠No more dual boot!
⢠Can even transfer data (e.g., cut-and-paste) between VMs
2. Protection
⢠Crash or intrusion in one OS doesnât affect others
⢠Easy to replace failed OS with fresh, clean one
28. IMPORTANT USES OF VMs (2)
3. Software Management
⢠VMs can run complete SW stack, even old OSes like DOS
⢠Run legacy OS, stable current, test release on same HW
4. Hardware Management
⢠Independent SW stacks can share HW
⢠Run application on own OS (helps dependability)
⢠Migrate running VM to different computer
⢠To balance load or to evacuate from failing HW
29.
30.
31.
32.
33. To Sum UpâŚ
⢠Virtual machines are a number of discrete identical
execution environments on a single computer, each of which
runs an operating system. This can allow applications
written for one OS to be executed on a machine which runs
a different OS which provide a greater level of isolation
between processes than is achieved when running multiple
processes on the same instance of an OS.