Javatpoint Logo
Javatpoint Logo

Virtual Machine

Virtual Machine can be defined as an emulation of the computer systems in computing. Virtual Machine is based on computer architectures. It also gives the functionality of physical computers. The implementation of VM may consider specialized software, hardware, or a combination of both.

History of Virtual Machine

  • System Virtual Machines are notably implemented within the CTSS (Compatible Time-Sharing System). Time-Sharing permitted more than one user for using the computer concurrently. All the programs displayed to have complete access to a machine, but a single program can only run at a time. It was derived into virtual machines by the research system of IBM notably. The 44X/M44 are using partial virtualization, and SIMMON and CP-40 are using full virtualization. These are some examples of hypervisors.
  • The first architecture of the virtual machine was CMS/CP-67. An important differentiation was among using many virtual machines on a single host for time-sharing as within the CP-40 and 44X/M44.
  • Emulators date turn to the 360/IBM System in 1963 with hardware emulation of previous systems for compatibility.
  • Originally, process virtual machines developed as abstract environments for any intermediate language applied as a program's intermediate representation by the compilers. The O-code machine was an example of early 1966. The O-code machine was a VM that runs object code (O-code) expanded by the BCPL compiler's front end. This abstraction permitted the compilers to be ported to any new architecture easily.
  • The Euler language applied the same design with an intermediate language called portable (P). It was promoted by Pascal in 1970, notably within the Pascal-P system and Pascal-S compiler. They were known as p-code and the p-code machine as the resulting machine.
  • It has been affecting, and VMs within this type of sense have been generally known as p-code machines often. In addition, Pascal p-code was run by an interpreter directly which is used for implementing VM.
  • Another example is SNOBOL (1967). It was specified in SIL (SNOBOL Implementation Language) that is an assembly language for VM. It was intended to physical machines through transpiling to the native assembler by a macro assembler.
  • Process VM was a famous approach for implementing microcomputer software, containing adventure and Tiny BASIC games. It can be done by some Implementations like Pyramid 2000 to any general-purpose engine such as z-machine of Infocom.
  • Significant advances illustrated in the Smalltalk-80 implementation (specifically the Schiffmann/Deutsch Implementations). They can push forward the JIT (Just In Time) compilation as the implementation approach which applies process VM. Notably, later Smalltalk virtual machines were Strongtalk, Squeak Virtual Machine, and VisualWorks.
  • A complimentary language generated many VM innovation which pioneered generational garbage collection and adaptive optimization. Commercially, these methods were approved successfully within the HostSpot Java virtual machine in 1999.
  • Other innovations contain the register-based VM to match various underlying hardware, instead of a stack-based VM that is closer for any programming language. It was pioneered in 1995 for the Limbo language by Dis VM. OpenJ9 is a substitute for HotSpot Java virtual machine inside the OpenJDK. Also, it is an open-source project requesting good startup and fewer resource consumption when compared to HotSpot.

Types of Virtual Machine

There are distinct types of VM available all with distinct functionalities:

Virtual Machine
  • System virtual machines: These types of virtual machines are also termed as full virtualization VMs. It facilitates a replacement for an actual machine. These VMs offers the functionality required for executing the whole operating system (OS). A hypervisor applies native execution for managing and sharing hardware. It permits for more than one environment that is separated from each other while exists on a similar physical machine. Novel hypervisor applies virtualization-specific hardware and hardware-assisted virtualization from various host CPUs primarily.
  • Process virtual machines: These Virtual Machines are created for executing several programs of the computer within the platform-independent environment.

A few VMs are developed for emulating distinct architectures like QEMU. It permits the execution of operating system and software applications written for other architectures or CPU. Operating-system-level virtualization permits the computer resources to be categorized by the kernel.

What is System Virtual Machines?

Originally, a Virtual Machine was described by Goldberg and Popek as "an isolated and efficient duplicate of an actual computer machine." The latest use combines virtual machines that haven't any direct relation with actual hardware. Generally, the real world or physical hardware (executing the virtual machine) is termed as the "host" and the VM copied on the machine is generally termed as the "guest."

Working of System Virtual Machines

The host could emulate various guests, all of which could emulate distinct hardware platforms and operating systems.

A craving to execute more than one operating system was a starting objective of the virtual machines. It allows time-sharing between many individual tasking operating systems. A system VM can be could be considered the concept generalization of virtual memory that preceded it historically.

CMS/CP of IBM, the initial systems that permit full virtualization, equipped to be sharing by giving all users an individual-user OS (Operating System). The system VM designated the user for writing privileged instructions inside the code. This type of method has some advantages like including output/input devices not permitted by any standard system.

Memory over-commitment's new systems may be used for managing memory sharing between several VMs over a single computer OS. It is because technology expands VM for various virtualization purposes. It can be possible to distribute memory pages that include identical contents for many VMs that execute on a similar physical machine. As a result, mapping them to a similar physical page by a method called KSM (kernel-same page merging).

It is useful especially for various read-only pages, like those containing code segments. It is a case for more than one VM executing the similar or same middleware components, web servers, software libraries, software, etc. A guest OS doesn't require to be compliant with any host hardware, hence making it feasible to execute distinct OS on a similar computer (such as an operating system's prior version, Linux, or Windows) for supporting future software.

Uses of System Virtual Machines

The virtual machine can be used for supporting isolated guest OS. It is popular regarding embedded systems. A common use might be to execute the real-time operating system with a preferred complicated operating system simultaneously such as Windows or Linux.

Other uses might be for unproven and novel software that is still in the stage of development, thus it executes in a sandbox. VMs have other aspects of OS development. It may contain faster reboots and developed debugging access.
More than one virtual machine running their guest OS is engaged for the consolidation of the server frequently.

What is Process Virtual Machines?

A process virtual machine is sometimes known as MRE (Manages Runtime Environment) or application virtual machine. It runs as a general application in the host operating system and supports an individual process. These are created if that process begins and destroyed if it exits.

The purpose of the process VM is to facilitate a programming environment that is platform-independent. It abstracts away all the information of the underlying operating system or hardware. It allows the programs to be executed on any platform in a similar way.

A process virtual machine gives the high-level abstraction of a high-level programming language. Process virtual machine can be implemented with the use of an interpreter. Its performance proportionate to the programming language (compiled) can be attained by using a just-in-time compilation.

The process virtual machine has become famous with the Java programming language. It can be implemented with the Java virtual machine. Another example includes the .NET Framework and Parrot virtual machine which executes on the virtual machine known as the Common Language Runtime. Each of them could be served as the abstraction layer for a computer language.

The process virtual machine has a special case for those systems that essence on the communication mechanisms of the (heterogeneous potentially) computer clusters. These types of virtual machines do not include any individual process, although one process/physical machine inside the cluster.

These clusters are created to mitigate the programming confluent applications task by enabling the programmers to concentrate on algorithms instead of the communication mechanisms given by the OS and interconnect.

They don't hide a fact that communication takes place and attempt to illustrate a cluster as an individual machine.

This system doesn't give a particular programming language, unlike other types of process virtual machines, although, they are embedded within any existing language. Such any system typically facilitates binding for many languages (like FORTRAN and C).

Examples are MPI (Message Passing Interface) and PVM (Parallel Virtual Machine). They are not virtual machines strictly because various applications executing on the top still contain access to every OS service. Thus, they are not restricted to the model of the system.

Full Virtualization

The virtual machine affects hardware to permit a guest operating system to be executed in separation in full virtualization. It was developed in 1966 using the IBM CP-67 and CP-40 which are the VM family's predecessors.

Some of the examples outside the field of mainframe include Egenera vBlade technology, Win4Lin Pro, Win4BSD, Mac-on Linux, Adeos, QEMU, VMware ESXi, VMware Server (also known as GSX Server), VMware Workstation, Hyper-V, Virtual Server, Virtual PC, Oracle VM, Virtual Iron, VirtualBox, Parallels Desktop for Mac, and Parallels Workstation.

Hardware-assisted virtualization

The hardware facilitates architectural support in hardware-assisted virtualization. This architectural support provides help for creating a monitor of the virtual machine and permits various guest operating systems to be executed in separation.

This type of virtualization was first defined in 1972 on the IBM System/370. It was introduced for applying with VM/370. The initial virtual machine OS provided by IBM was the official product.

AMD and Intel give additional hardware for supporting virtualization in 2006 and 2005. In 2005, Sun Microsystems (Oracle Corporation) have included similar aspects in the UltraSPARC T-Series processors. Virtualization platform's examples adapted to some hardware include Parallels Workstation, VirtualBox, Oracle VM Server for SPARC, Parallels Desktop for Mac, Xen, Windows Virtual PC, Hyper-V, VMware Fusion, VMware Workstations, and KVM.

First-generation 64-bit and 32-bit x86 hardware support have been detected to facilitate performance benefits on software virtualization in 2006.

Operating-system-level virtualization

A physical server can be virtualized on the OS level in operating-system-level virtualization. It allows more than one secure and isolated virtualized server for running on an individual physical server.

The environment of the guest operating system shares a similar running instance of an operating system as any host system. Hence, a similar operating system kernel is used for implementing guest environments. Also, various applications that are running within the provided guest environment consider it as the stand-alone system.

The original implementation was FreeBSD jails. Another example includes iCore Virtual Accounts, Parallels Virtuozzo Containers, AIX Workload Partitions, LXC, Linux-Vserver, OpenVZ, Solaris Containers, and Dockers.

Full virtualization can be possible with the accurate combination of software and hardware elements only. For example, full virtualization is not possible using most of the System/360 series of IBM and early System/360 system of IBM.

In 1972, IBM included virtual memory hardware to the series of System/370 which is not similar to the Intel VT-x Rings. It facilitates a higher-level of privilege for the hypervisor to handle virtual machines properly.

Challenges for full virtualization

Full virtualization's primary challenge is the simulation and interception of various privileged operations like I/O instructions. The consequence of all operations implemented in a provided VM should be kept inside that VM.
Virtual operations can't be permitted to change any other VM state, hardware, and the control program.

A few machine instructions could be run via the hardware directly since all the effects are contained entirely in the components which are handled by the control programs like arithmetic registers and memory locations.

Although, other instructions (that can pierce the VM) can't be permitted to run directly. They should rather be simulated and trapped. These types of instructions either affect or access the state data that is external to the VM.
Full virtualization is highly successful for some of the following reasons:

  • Separating users from one other (or from the control program)
  • Distribute a single computer system between more than one user
  • Imitating new hardware for achieving improved productivity, security, and reliability.

Advantages of VM

  • Virtual Machine facilitates compatibility of the software to that software which is executing on it. Hence, each software specified for a virtualized host would also execute on the VM.
  • It offers isolation among distinct types of processors and OSes. Hence, the processor OS executing on a single virtual machine can't change the host of any other host systems and virtual machines.
  • Virtual Machine facilitates encapsulation. Various software present over the VM could be controlled and modified.
  • Virtual machines give several features such as the addition of new operating system. An error in a single operating system will not affect any other operating system available on the host. It offers the transfer of many files between VMs, and no dual booting for the multi-OS host.
  • VM provides better management of software because VM can execute a complete stack of software of the run legacy operating system, host machine, etc.
  • It can be possible to distribute hardware resources to software stacks independently. The VM could be transferred to distinct computers for balancing the load.

Next TopicWhat is Snapshot




Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA