Virtualization | Xen: Paravirtualization
Last Updated :
11 Jul, 2022
Prerequisites - Introduction to Virtualization, Machine Reference Model of Virtualization
Xen is an open source hypervisor based on paravirtualization. It is the most popular application of paravirtualization. Xen has been extended to compatible with full virtualization using hardware-assisted virtualization. It enables high performance to execute guest operating system. This is probably done by removing the performance loss while executing the instructions requiring significant handling and by modifying portion of the guest operating system executed by Xen, with reference to the execution of such instructions. Hence this especially support x86, which is the most used architecture on commodity machines and servers.
Figure - Xen Architecture and Guest OSnManagement
Above figure describes the Xen Architecture and its mapping onto a classic x86 privilege model. A Xen based system is handled by Xen hypervisor, which is executed in the most privileged mode and maintains the access of guest operating system to the basic hardware. Guest operating system are run between domains, which represents virtual machine instances.
In addition, particular control software, which has privileged access to the host and handles all other guest OS, runs in a special domain called Domain 0. This the only one loaded once the virtual machine manager has fully booted, and hosts an HTTP server that delivers requests for virtual machine creation, configuration, and termination. This component establishes the primary version of a shared virtual machine manager (VMM), which is a necessary part of Cloud computing system delivering Infrastructure-as-a-Service (IaaS) solution.
Various x86 implementation support four distinct security levels, termed as rings, i.e.,
Ring 0,
Ring 1,
Ring 2,
Ring 3
Here, Ring 0 represents the level having most privilege and Ring 3 represents the level having least privilege. Almost all the frequently used Operating system, except for OS/2, uses only two levels i.e. Ring 0 for the Kernel code and Ring 3 for user application and non-privilege OS program. This provides a chance to the Xen to implement paravirtualization. This enables Xen to control unchanged the Application Binary Interface (ABI) thus allowing a simple shift to Xen-virtualized solutions, from an application perspective.
Due to the structure of x86 instruction set, some instructions allow code execution in Ring 3 to switch to Ring 0 (Kernel mode). Such an operation is done at hardware level, and hence between a virtualized environment, it will lead to a TRAP or a silent fault, thus preventing the general operation of the guest OS as it is now running in Ring 1.
This condition is basically occurred by a subset of system calls. To eliminate this situation, implementation in operating system requires a modification and all the sensitive system calls needs re-implementation with hypercalls. Here, hypercalls are the particular calls revealed by the virtual machine (VM) interface of Xen and by use of it, Xen hypervisor tends to catch the execution of all the sensitive instructions, manage them, and return the control to the guest OS with the help of a supplied handler.
Paravirtualization demands the OS codebase be changed, and hence all operating systems can not be referred to as guest OS in a Xen-based environment. This condition holds where hardware-assisted virtualization can not be free, which enables to run the hypervisor in Ring 1 and the guest OS in Ring 0. Hence, Xen shows some limitations in terms of legacy hardware and in terms of legacy OS.
In fact, these are not possible to modify to be run in Ring 1 safely as their codebase is not reachable, and concurrently, the primary hardware hasn’t any support to execute them in a more privileged mode than Ring 0. Open source OS like Linux can be simply modified as its code is openly available, and Xen delivers full support to virtualization, while components of Windows are basically not compatible with Xen, unless hardware-assisted virtualization is available. As new releases of OS are designed to be virtualized, the problem is getting resolved and new hardware supports x86 virtualization.
Pros:
- a) Xen server is developed over open-source Xen hypervisor and it uses a combination of hardware-based virtualization and paravirtualization. This tightly coupled collaboration between the operating system and virtualized platform enables the system to develop lighter and flexible hypervisor that delivers their functionalities in an optimized manner.
- b) Xen supports balancing of large workload efficiently that capture CPU, Memory, disk input-output and network input-output of data. It offers two modes to handle this workload: Performance enhancement, and For handling data density.
- c) It also comes equipped with a special storage feature that we call Citrix storage link. Which allows a system administrator to uses the features of arrays from Giant companies- Hp, Netapp, Dell Equal logic etc.
- d) It also supports multiple processor, Iive migration one machine to another, physical server to virtual machine or virtual server to virtual machine conversion tools, centralized multiserver management, real time performance monitoring over window and linux.
Cons:
- a) Xen is more reliable over linux rather than on window.
- b) Xen relies on 3rd-party component to manage the resources like drivers, storage, backup, recovery & fault tolerance.
- c) Xen deployment could be a burden some on your Linux kernel system as time passes.
- d) Xen sometimes may cause increase in load on your resources by high input-output rate and and may cause starvation of other Vm's.
Similar Reads
Virtualization | VMware: Full Virtualization
Prerequisites - Introduction to Virtualization, Machine Reference Model of Virtualization In full virtualization, primary hardware is replicated and made available to the guest operating system, which executes unaware of such abstraction and has no requirements to modify. The technology of VMware is
3 min read
Characteristics of Virtualization
Prerequisite - Virtualization In Cloud Computing and Types 1. Increased Security - The ability to control the execution of a guest program in a completely transparent manner opens new possibilities for delivering a secure, controlled execution environment. All the operations of the guest programs ar
5 min read
Data Virtualization
Data virtualization is used to combine data from different sources into a single, unified view without the need to move or store the data anywhere else. It works by running queries across various data sources and pulling the results together in memory. To make things easier, it adds a layer that hid
9 min read
Hardware Based Virtualization
Prerequisite - Virtualization In Cloud Computing and Types, Types of Server Virtualization, Hypervisor A platform virtualization approach that allows efficient full virtualization with the help of hardware capabilities, primarily from the host processor is referred to as Hardware based virtualizatio
5 min read
Virtualization in Distributed System
Virtualization in distributed systems enhances flexibility and resource efficiency by abstracting hardware and software layers. This technology enables the creation of virtual environments, optimizing resource use, improving scalability, and simplifying management in complex, distributed infrastruct
11 min read
Drawbacks of adopting Virtualization
Virtualization is a technique how to separate a service from the underlying physical delivery of that service. It is the process of creating a virtual version of something like computer hardware. It was initially developed during the mainframe era. It involves using specialized software to create a
5 min read
Operating system based Virtualization
Operating System-based Virtualization is also known as Containerization. It is a technology that allows multiple isolated user-space instances called containers to run on a single operating system (OS) kernel. Unlike traditional virtualization, where each virtual machine (VM) requires its own OS, OS
5 min read
Virtualization to Promote Green Computing
A data center consumes the power that can otherwise be used to power thousands of homes, that huge level of power consumption is what makes data center and environmentalists look for ways to reduce power usage and make data centers for more energy-efficient than they currently are. Virtualization is
5 min read
The Architecture of Virtualization in Cloud Computing
Virtualization in cloud computing helps create virtual versions of hardware, such as desktop computers, with a virtual ecosystem of operating systems, storage, memory, and networking services. The virtualization architecture uses the same hardware to run multiple operating systems on the same machin
8 min read
On-Premises Cost Estimates of Virtualization
Prerequisite - Virtualization and types of virtualization, Characteristics of Virtualization On-Premises cost is calculated on the basis of various factors such as hardware type, operating system used, storage, database, virtualization tools, and various others. The default cost rate can be estimate
5 min read