In: Computer Science
Explain the difference between the three different levels of virtualisation: CPU Instruction Set level, Hardware Abstraction Layer (HAL) level, and Operating System level.
CPU Instruction Set level -
The instruction set provides commands to the processor, to tell it what it needs to do. The instruction set consists of addressing modes, instructions, native data types, registers, memory architecture, interrupt, and exception handling, and external I/O.In ISA, virtualization works through an ISA emulation. This is helpful to run heaps of legacy code which was originally written for different hardware configurations. These codes can be run on the virtual machine through an ISA. A binary code that might need additional layers to run can now run on an x86 machine or with some tweaking, even on x64 machines. ISA helps make this a hardware-agnostic virtual machine. The basic emulation, though, requires an interpreter. This interpreter interprets the source code and converts it to a hardware readable format for processing.
Hardware Abstraction Layer (HAL) level -
In computers, a hardware abstraction layer (HAL) is a layer of programming that allows a computer OS to interact with a hardware device at a general or abstract level rather than at a detailed hardware level. HAL can be called from either the OS's kernel or from a device driver. As the name suggests, this level helps perform virtualization at the hardware level. It uses a bare hypervisor for its functioning.This level helps form the virtual machine and manages the hardware through virtualization.It enables virtualization of each hardware component such as I/O devices, processors, memory, etc. This way multiple users can use the same hardware with numerous instances of virtualization at the same time. IBM had first implemented this on the IBM VM/370 back in 1960. It is more usable for cloud-based infrastructure. Thus, it is no surprise that currently, Xen hypervisors are using HAL to run Linux and other OS on x86 based machines.
Operating System level -
OS-level virtualization is an operating system paradigm in which the kernel allows the existence of multiple isolated user space instances. At the operating system level, the virtualization model creates an abstract layer between the applications and the OS. It is like an isolated container on the physical server and operating system that utilizes hardware and software. Each of these containers functions like servers.When the number of users is high, and no one is willing to share hardware, this level of virtualization comes in handy. Here, every user gets their own virtual environment with dedicated virtual hardware resources. This way, no conflicts arise.