Presentation is loading. Please wait.

Presentation is loading. Please wait.

Xen I/O Overview. Xen is a popular open-source x86 virtual machine monitor – full-virtualization – para-virtualization para-virtualization as a more efficient.

Similar presentations


Presentation on theme: "Xen I/O Overview. Xen is a popular open-source x86 virtual machine monitor – full-virtualization – para-virtualization para-virtualization as a more efficient."— Presentation transcript:

1 Xen I/O Overview

2 Xen is a popular open-source x86 virtual machine monitor – full-virtualization – para-virtualization para-virtualization as a more efficient and lower overhead mode of virtualizations

3 Virtualization Approaches Full-Virtualization Pros Need not to modify guest OS Cons Significant performance hit 3

4 CPU VIRTUALIZATION Emulation techniques Trap and emulate model Hardware assistance

5 Trap and Emulate Model Traditional OS : – When application invoke a system call : CPU will trap to interrupt handler vector in OS. CPU will switch to kernel mode (Ring 0) and execute OS instructions. – When hardware event : Hardware will interrupt CPU execution, and jump to interrupt handler in OS.

6 Virtualization Techniques How to virtualize unvirtualizable hardware : – Para-virtualization Modify guest OS to skip the critical instructions. Implement some hyper-calls to trap guest OS to VMM. – Binary translation Use emulation technique to make hardware virtualizable. Skip the critical instructions by means of these translations. – Hardware assistance Modify or enhance ISA of hardware to provide virtualizable architecture. Reduce the complexity of VMM implementation.

7 MEMORY VIRTUALIZATION Shadow page table Hardware assistance

8 Memory Virtualization Memory management in OS – Traditionally, OS fully controls all physical memory space and provide a continuous addressing space to each process. – In server virtualization, VMM should make all virtual machines share the physical memory space without knowing the fact. Goals of memory virtualization : – Address Translation Control table-walking hardware that accesses translation tables in main memory. – Memory Protection Define access permission which uses the Access Control Hardware. – Access Attribute Define attribute and type of memory region to direct how memory operation to be handled.

9 Virtualization Approaches Para-Virtualization Pros Light weight and high performance Cons Require modification of guest OS 9

10 Virtualization techniques Server VirtualizationStorage VirtualizationNetwork Virtualization

11 Xen I/O Overview In para-virtualization I/O mode – Xen VMM layer uses asynchronous hypercall mechanism to deliver virtual interrupts – Notifications among domains via event channel What’s Virtual Machine Monitor (VMM) ? VMM or Hypervisor is the software layer providing the virtualization

12 Xen I/O Overview A privileged domain called Dom0 – Driver domain hosting unmodified Linux drivers – Access to hardware devices – Performs I/O operations on behalf of unprivileged guest domains

13 Xen I/O Architecture. The logical components of the latest Xen I/O model

14 Xen I/O Overview Virtual network interface in guest domain is called netfront In Dom0, netback is a counterpart for netfront Netfront and netback use a bidirection ring of asynchronous requests to exchange data The bridge in Dom0 handles the packets from NIC and performs the software based routine

15 Xen I/O Overview Receive packet by the NIC (RX) – Raises an interrupt to the upper layer – Hypervisor (VMM) handles the interrupt first Hypervisor determine whether Dom0 has the access to the real hardware

16 Xen I/O Overview Receiving the interrupt, Dom0 starts to process the network packet – Removes the packet from NIC – Sends the packet to the bridge – Bridge de-multiplexes the packet and delivers it to the appropriate netback interface

17 Xen I/O Overview Netback raises a hypercall to hypervisor, requesting an unused memory page Hypervisor notifies to grant a page to keep the memory allocation balanced Netback copies the received data to granted page in guest domain Guest domain receives the packet as if it comes directly from NIC

18 Xen I/O Overview Applied to send a packet on the send path (TX), explicit memory page Ownership of physical page is transferred instead of the real page

19 Xen I/O Overview Protect the I/O buffer in guest domain’s memory Share the I/O buffer with Dom0 properly Hypervisor creates a unique grant table for each guest domain – Only can be accessed by hypervisor and guest domain

20 Xen I/O Overview Guest domain initializes an associated memory I/O buffer shared with Dom0 Dom0 requests to exchange the I/O data with guest domain guest domain invokes a grant, then a entry in grant table with three key information – (1) Valid memory page address – (2) Dom0’s id – (3) Operation permission(read-only for transmission or read-write for reception)

21 Xen I/O Overview guest domain issues a hypercall through hypervisor to Dom0 – Pass a indexes the correct entry in grant table – Dom0 can find the grant entry – Hypervisor validate Dom0 to perform the I/O operation in I/O buffer

22 Xen I/O Overview When I/O exchange is accomplished or guest domain wants to repurpose the granted page – Another hypercall is issued to hypervisor Hypervisor synchronizes access permission between Dom0 and guest domain If Dom0 gives up the granted page – guest domain revokes the grant by another simple writing operation

23 Testbed Architechure Logical components of virtualized cloud environments

24 Bin packing problem Bin packing problem is a combinatorial NP- hard problem Definition: – n objects of different – Objects size is a 1,a 2,..,a n – m bins – Each of volume V Objects packed into bins, and minimizes the number of bins used

25 Bin packing problem Best-fit algorithm – Initially all bins are empty – start with bins k = 0 and item i = 1 – Consider all bins j = 1,…, k, place item i in the bin that has must accordance residual capacity

26 Bin packing problem First Fit Algorithm – Initially all bins are empty – start with bins k = 0 and item i = 1 – Consider all bins j = 1,…, k, place item i in the first bin that has sufficient residual capacity – If there is no such bin increment k and repeat until item n is assigned

27 Bin packing problem Next Fit Algorithm – Initially all bins are empty – start with bin j = 1 and item i = 1 – If bin j has residual capacity for item i, assign item i to bin j, and consider item i + 1 – Otherwise consider bin j + 1 and item i.


Download ppt "Xen I/O Overview. Xen is a popular open-source x86 virtual machine monitor – full-virtualization – para-virtualization para-virtualization as a more efficient."

Similar presentations


Ads by Google