This document discusses cloud computing and virtualization techniques. It begins by defining cloud computing and its benefits like scalability and pay-as-you-go models. It then discusses virtualization, specifically how virtual machines (VMs) allow multiple guest operating systems to run simultaneously on a single physical host. The document outlines requirements for virtualization like intercepting privileged instructions. It also describes different VM implementation techniques like binary translation, paravirtualization, and hardware-assisted virtualization. Finally, it provides details on the Xen virtualization platform and how it implements CPU, memory, and I/O sharing across VMs.
2. CONTENTS
• Cloud Computing
• Need And Features
• Virtualization
• what is it
• benefits
• VM Implementation Techniques
• XEN Internals
• XEN Domains
• CPU Sharing
• Memory Sharing
• IO Sharing
3. CLOUD COMPUTING
• Cloud computing really is accessing resources and services
needed to perform functions with dynamically changing needs.
... The cloud is a virtualization of resources that maintains and
manages itself
• Scale your infrastructure on demand within minutes or even
seconds, instead of days or weeks, thereby avoiding
underutilization (idle servers) and overutilization.
• A broad array of webbased services aimed at allowing users
to obtain a wide range of functional capabilities on a 'pay as
you go' basis.
– On-demand service
– Networked Shared Resources
– Flexible Provisioning
– Fine-grained metering
5. RESOURCE PROVISIONING –
DATACENTER/CLOUD PROVIDER'S
VIEW
2000 2050
0 0
Company - BLUE Company - RED
3000
â—Ź Charge for 4050 machines,
Work with 3000
â—Ź Good Business
â—Ź Computing as a service or
utility.
0
Cloud Provider
6. WHAT IS REQUIRED
By Cloud Provider
● Fast scalability – Quick addition and removal
of servers.
â—Ź Service to customers should not be denied.
â—Ź SLA should not be Violated.
â—Ź Efficient Resource Utilization.
7. WHAT IS VIRTUALIZATION
“Virtualization, in computing, is the creation of
a virtual (rather than actual) version of
something, such as a hardware platform,
operating system, a storage device or
network resources”
Concept is not new.
● Multi Programming – Each Process thinks it has
complete control on all of the resources.
– Virtual Memory
– CPU Sharing
8. SIMILARITIES AND DIFFERENCES WITH
MULTIPROGRAMMING
â—Ź Multi Programming â—Ź Virtualization
– CPU is shared among – CPU is shared among
processes OSs.
– Memory is shared using – Memory is shared using
Page Tables. more level of
indirections. Multiple
– Process knows it is
Page tables.
being managed- uses
system calls. – OS may or may not
know that it is being
managed.
9. VIRTUALIZATION
ARCHITECTURE
â—Ź OS assumes complete control of the underlying hardware.
â—Ź Virtualization architecture provides this illusion through a
hypervisor/VMM.
â—Ź Hypervisor/VMM is a software layer which:
– Allows multiple Guest OS (Virtual Machines) to run simultaneously
on a single physical host
– Provides hardware abstraction to the running Guest OSs and
efficiently multiplexes underlying hardware resources.
10. PHYSICAL VS. VIRTUAL MACHINE
â—Ź Single OS â—Ź Machine view to OS is
independent of hardware
â—Ź h/w + s/w tightly coupled
â—Ź Multiple OS (isolated apps)
â—Ź Application crashes affect
all â—Ź Safely multiplex resources
across VMs
â—Ź Resource under-utilization
11. IMPORTANCE OF VIRTUALIZATION IN
CLOUD COMPUTING
â—Ź Cloud can exist without Virtualization, although it
will be difficult and inefficient.
● Cloud makes notion of “Pay for what you use” ,
“infinite availability- use as much you want”.
â—Ź These notions are practical only if we have
– lot of flexibility
– efficiency in the back-end. IO Ring
12. REQUIREMENT FOR
VIRTUALIZABILITY
Popek and Goldberg mentioned a set of
requirements
â—Ź They divided instructions into three
categories:
â—Ź Privileged instructions: execute in a privileged
mode, but will trap otherwise.
â—Ź Control sensitive instructions: attempt to change
the config of resources.
â—Ź Behavior sensitive instructions: are those that
behave in a different way depending on the config of
resources.
13. REQUIREMENT FOR
VIRTUALIZABILITY
â—Ź They said that all sensitive instructions must
also be privileged instructions.
â—Ź Hypervisor must be able to intercept any
instructions that changes the state of the
machine in a way that impacts other
processes.
15. BINARY TRANSLATION
â—Ź Binary image of OS is manipulated at the runtime.
â—Ź Privileged instructions are rewritten to point to
their emulated versions.
â—Ź Performance from this approach is not ideal,
particularly when doing anything I/O intensive.
â—Ź Caching of the locations of unsafe instructions
can speed Up.
â—Ź Used in VMWare.
16. PARAVIRTUALIZATION
â—Ź Make OS aware of underlying Virtualization env.
â—Ź OS's code is manipulated.
â—Ź Important system calls are changed to point to the
implementation provided by the VMM.
17. HW SUPPORTED VIRTUALIZATION
• OS stays in its original privilege level 0.
• Attempts to access the hardware directly are
caught and passed to VMM.
• In other words a new privilege ring is setup
for the VMM.
• Added new instructions which makes
Virtualization considerably easier for x86.
• Intel – IVT(Intel Virtualization Technology)
• AMD – introduced AMD-V
18. XEN DOMAINS
• Xen runs guests in environments known as domains which encapsulate a
complete running virtual environment
• There are two types pf Domains:
• DomU –
• the “U” stands for unprivileged.
• Guest OSs run in this domain.
• Dom0
• has elevated privileges
• Provides device drivers
• Provides tools/mechanisms to configure Virtualization environment
Privileged Domain UnPrivileged Domains
Dom0 DomU DomU
XEN
Hardware
19. CPU SHARING
• VMM or Hypervisor provides a virtual view of CPU to VMs.
• In multi processing, CPU is alloted to the different processes in
form of time slices by the OS.
• Similarly VMM or Hypervisor allots CPU to different VMs.
App1 App2 App1 App2 App3 App1 App2
VM1 OS VM2 OS VM3 OS
VM1 VM2 VM3
VMM
CPU Time
20. MEMORY SHARING
• In Multiprogramming there is a single level of indirection mainatained by
Kernel.
• In case of Virtual Machines there is one more level of indirection
maintained by VMM
Applications use Virtual Addresses
Page Table
Kernel translates Virtual Addresses to
PseudoPhysical Addresses
Page Table
Hypervisor translates PseudoPhysical
Addresses to Machine addresses
23. FUTURE ASPECTS
• Currently SalesForce CRM has 97,700 customers across
the global.
As per survey across the global 41,546 companies are
willing to move to SalesForce CRM by end of 2013.
• “World should follow India & Japan in cloud
computing”
Vivek Kundra, Chief information officer, US