Introduction to Virtualization Shruti - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

Introduction to Virtualization Shruti

Description:

View of a virtualized m/c. Definition ... Thin layer of software running on the hardware. Supports creation of partitions ... page table structure in hardware. ... – PowerPoint PPT presentation

Number of Views:22
Avg rating:3.0/5.0
Slides: 24
Provided by: shrutivi
Category:

less

Transcript and Presenter's Notes

Title: Introduction to Virtualization Shruti


1
Introduction to Virtualization Shrut
i
2
Contents
  • Introduction
  • History of Virtual machines
  • Benefits
  • Example Xen
  • Architecture
  • Performance
  • Screen shots
  • Conclusion

3
History of Virtualization
  • Introduced in 1960's to allow partitioning of
    large, mainframe h/w (scarce and expensive)
  • Mini computers and pc's provided more efficient
    and affordable way to distribute processing
    power.
  • By 1980's Virtualization was not employed
  • In 1990's researchers saw how vm could solve some
    problems like proliferation of less expensive h/w.

4
Traditional Enterprise IT
  • 6/7 million servers manufactured every year.
  • Most of them are Intel x86 architecture
  • Single app runs on OS across the data centers.
  • Is too costly a h/w.

App OS
APP OS
5-10
5
Trend in Enterprise IT
App
App
App
Os
Os
Os
Virtualization
Hardware
Running applications side by side.
View of a virtualized m/c.
6
Definition
  • Abstraction layer that decouples the physical
    hardware from the OS.
  • Multiple virtual machines, heterogeneous OS's,
    run in isolation, side-by-side, same physical
    machine.
  • Each VM has its own virtual hardware (e.g., RAM,
    CPU, NIC, etc.) on which OS and app's are loaded.

7
Benefits of Virtualization
  • Partitioning
  • Multiple apps and OS in 1 physical system.
  • Resources allocated to VM in a controlled manner
  • Isolation
  • Isolated from host and other VM's.
  • No data leak across VM's. App's communicate over
    n/w
  • Encapsulation
  • 1 VM env saved as 1 file, easy to move and copy.
  • 1 standard virtual h/w to the app- guarantees
    compatibility.

8
Xen
  • Is a VM monitor for X86.
  • Supports execution of multiple guest Operating
    sys.
  • Is an Open Source software.
  • Each OS performs its own paging using its memory
    reservation and disk allocation.
  • Challenges
  • Isolation
  • Performance overhead made small
  • Supporting multiple OS.

9
Virtual Machine Interface
X86 Architecture
Memory Management
CPU
Device I/O
10
Memory Management
  • Most difficult part Hypervisor, porting each
    guest OS
  • Hypervisor
  • Thin layer of software running on the hardware.
  • Supports creation of partitions
  • Each partition is a virtual machine
  • Each partition has one or more virtual processors
  • Partitions can own or share hardware resources.
  • Software running in partition is called a guest.
  • Enforces memory access rules.
  • Enforces policy for CPU usage
  • Virtual processors are scheduled on real
    processors.
  • Enforces ownership of other devices.
  • Provides simple inter-partition messaging
  • Messages appear as interrupts

11
MM cont..
  • Each guest OS performs its own paging using its
    own memory reservation and disk allocation.
  • Done using TLB. TLB misses processed by walking
    page table structure in hardware.
  • So, all valid page translations for current
    address space should be on the h/w accessible
    page.
  • Each time guest OS requires a new page table(new
    process) it allocates a page from memory.
  • Updates must be made and validated by Xen.
  • Xen occupies top 64MB region of each addr space,
    not accessed by guest OS.

12
CPU
  • CPU virtualization has several implications on
    Os.
  • Due to the Hypervisor below the OS, OS is not
    given the top level privilege.
  • So, OS should be modified to run at lower
    privilege
  • X86 supports 4 privilege levels called
    rings.(0-3)
  • OS code executes on ring 0 and application code
    on ring 3. Ring 1 and 2 are not used. All such OS
    can be ported to Xen easily.
  • So, OS does not execute privileged instructions
    and remains isolated from running applications.

13
CPU cont..
  • When OS tries to execute privileged instruction,
    its failed by processor.
  • Exceptions, memory faults and s/w traps are
    virtualized using a table.
  • Table handler for each exception registered
    with Xen.
  • 2 frequent exceptions system call, page faults.
  • System call accessed by processor.
  • Page faults delivered via Xen.

14
Device I/O
  • Xen exposes simple device abstractions.
  • So, easy to design an efficient interface which
    is protected and isolated.
  • I/O data transferred between domains using shared
    memory.
  • High performance communication mechanism for
    passing buffer information through the system.

15
Cost of Porting OS to Xen
  • XP required more modifications to its
    architecture.
  • It uses many structures and unions for accessing
    PTE's.
  • Each PTE has to be separately modified.
  • Linux needed less modifications.
  • It uses pre-processor macros to access PTE's.

16
Xen hypervisor with many guest os
17
Detail Design
  • 2 Interaction mechanisms b/n Xen and Domain
  • Hypercall b/n Domain to Xen.(synchronous)
  • Events b/n Xen and Domain.(asynchronous)
  • Data Transfer I/O rings.
  • Ring is a circular queue of descriptors.
  • Is allocated by domain but accessible by Xen.
  • Descriptors contain the reference to data.
  • Each ring accessed using 2 pairs of producer
    consumer pointers.
  • Domains place request on ring, request pointer
    advances, Xen removes the request and handles
    them, advances consumer pointer.

18
Structure of I/O rings.
Request Producer Shared pointer updated by guest
Os
Request Consumer Private pointer in Xen
Response producer shared pointer updated by Xen.
Response Consumer Private pointer in guest OS
19
Subsystem Virtualization
  • CPU Scheduling BVT scheduling algorithm.
  • Virtual Address Translations
  • Xen virtualizes memory with little overhead.
  • Xen updates page tables to prevent guest OSes to
    make unacceptable changes.
  • Xen registers guest OS page tables with MMU and
    restrict guest OSes to read-only access.
  • Page table updates are passed to Xen via
    hypercall.

20
Subsystem Virtualization cont...
  • Physical Memory
  • Initial memory allocation for each domain
    specified at the time of creation.
  • Memory is statically partitioned isolation.
  • Max allowable reservation may be specified.
  • Additional memory pages can be claimed from Xen
    if memory pressure within Xen increases.
  • If domain wishes to save resources, reduce memory
    reservation by releasing memory pages back to Xen.

21
Xen-Screen shot
22
Conclusion
  • Above were the advantages of virtualization with
    its working.
  • We can now allow 100 Os to run on a single server
    with low cost.
  • Xen is good for network-centric services.
  • It is observed that the performance of Xen is as
    good as a single Linux system.

23
Questions
Write a Comment
User Comments (0)
About PowerShow.com