In computing, a virtual machine (VM) is the
virtualization/
emulation of a
computer system. Virtual machines are based on
computer architectures and provide functionality of a physical computer. Their implementations may involve specialized hardware, software, or a combination.
Virtual machines differ and are organized by their function, shown here:
* ''
System virtual machines'' (also termed
full virtualization VMs) provide a substitute for a real machine. They provide functionality needed to execute entire
operating system
An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
s. A
hypervisor uses
native execution to share and manage hardware, allowing for multiple environments which are isolated from one another, yet exist on the same physical machine. Modern hypervisors use
hardware-assisted virtualization, virtualization-specific hardware, primarily from the host CPUs.
* Process virtual machines are designed to execute computer programs in a platform-independent environment.
Some virtual machine emulators, such as
QEMU and
video game console emulators, are designed to also emulate (or "virtually imitate") different system architectures thus allowing execution of software applications and operating systems written for another
CPU
A central processing unit (CPU), also called a central processor, main processor or just processor, is the electronic circuitry that executes instructions comprising a computer program. The CPU performs basic arithmetic, logic, controlling, a ...
or architecture.
Operating-system-level virtualization allows the resources of a computer to be partitioned via the
kernel. The terms are not universally interchangeable.
Definitions
System virtual machines
A "virtual machine" was originally defined by
Popek and Goldberg as "an efficient, isolated duplicate of a real computer machine."
Current use includes virtual machines that have no direct correspondence to any real hardware.
The physical, "real-world" hardware running the VM is generally referred to as the 'host', and the virtual machine emulated on that machine is generally referred to as the 'guest'. A host can emulate several guests, each of which can emulate different operating systems and hardware platforms.
The desire to run multiple operating systems was the initial motive for virtual machines, so as to allow time-sharing among several single-tasking operating systems. In some respects, a system virtual machine can be considered a generalization of the concept of
virtual memory
In computing, virtual memory, or virtual storage is a memory management technique that provides an "idealized abstraction of the storage resources that are actually available on a given machine" which "creates the illusion to users of a very ...
that historically preceded it. IBM's
CP/CMS
CP/CMS (Control Program/Cambridge Monitor System) is a discontinued time-sharing operating system of the late 1960s and early 1970s, known for its excellent performance and advanced features. It had three distinct versions:
* CP-40/CMS, an ...
, the first systems to allow
full virtualization, implemented
time sharing by providing each user with a single-user operating system, the
Conversational Monitor System (CMS). Unlike virtual memory, a system virtual machine entitled the user to write privileged instructions in their code. This approach had certain advantages, such as adding input/output devices not allowed by the standard system.
As technology evolves virtual memory for purposes of virtualization, new systems of
memory overcommitment Memory overcommitment is a concept in computing that covers the assignment of more memory to virtual computing devices (or processes) than the physical machine they are hosted, or running on, actually has. This is possible because virtual machines ...
may be applied to manage memory sharing among multiple virtual machines on one computer operating system. It may be possible to share ''memory pages'' that have identical contents among multiple virtual machines that run on the same physical machine, what may result in mapping them to the same physical page by a technique termed
kernel same-page merging (KSM). This is especially useful for read-only pages, such as those holding code segments, which is the case for multiple virtual machines running the same or similar software, software libraries, web servers, middleware components, etc. The guest operating systems do not need to be compliant with the host hardware, thus making it possible to run different operating systems on the same computer (e.g.,
Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for se ...
,
Linux
Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, whi ...
, or prior versions of an operating system) to support future software.
The use of virtual machines to support separate guest operating systems is popular in regard to
embedded system
An embedded system is a computer system—a combination of a computer processor, computer memory, and input/output peripheral devices—that has a dedicated function within a larger mechanical or electronic system. It is ''embedded ...
s. A typical use would be to run a
real-time operating system simultaneously with a preferred complex operating system, such as Linux or Windows. Another use would be for novel and unproven software still in the developmental stage, so it runs inside a
sandbox. Virtual machines have other advantages for operating system development and may include improved debugging access and faster reboots.
Multiple VMs running their own guest operating system are frequently engaged for server consolidation.
Process virtual machines
A process VM, sometimes called an ''application virtual machine'', or ''Managed Runtime Environment'' (MRE), runs as a normal application inside a host OS and supports a single process. It is created when that process is started and destroyed when it exits. Its purpose is to provide a
platform-independent programming environment that abstracts away details of the underlying hardware or operating system and allows a program to execute in the same way on any platform.
A process VM provides a high-level abstraction that of a
high-level programming language
In computer science, a high-level programming language is a programming language with strong abstraction from the details of the computer. In contrast to low-level programming languages, it may use natural language ''elements'', be easier to u ...
(compared to the low-level ISA abstraction of the system VM). Process VMs are implemented using an
interpreter; performance comparable to compiled programming languages can be achieved by the use of
just-in-time compilation.
This type of VM has become popular with the
Java programming language, which is implemented using the
Java virtual machine. Other examples include the
Parrot virtual machine
Parrot was a register-based process virtual machine designed to run dynamic languages efficiently. It is possible to compile Parrot assembly language and Parrot intermediate representation (PIR, an intermediate language) to Parrot bytecode a ...
and the
.NET Framework
The .NET Framework (pronounced as "''dot net"'') is a proprietary software framework developed by Microsoft that runs primarily on Microsoft Windows. It was the predominant implementation of the Common Language Infrastructure (CLI) until bein ...
, which runs on a VM called the
Common Language Runtime
The Common Language Runtime (CLR), the virtual machine component of Microsoft .NET Framework, manages the execution of .NET programs. Just-in-time compilation converts the managed code (compiled intermediate language code) into machine instru ...
. All of them can serve as an
abstraction layer for any computer language.
A special case of process VMs are systems that abstract over the communication mechanisms of a (potentially heterogeneous)
computer cluster
A computer cluster is a set of computers that work together so that they can be viewed as a single system. Unlike grid computers, computer clusters have each node set to perform the same task, controlled and scheduled by software.
The comp ...
. Such a VM does not consist of a single process, but one process per physical machine in the cluster. They are designed to ease the task of programming concurrent applications by letting the programmer focus on algorithms rather than the communication mechanisms provided by the interconnect and the OS. They do not hide the fact that communication takes place, and as such do not attempt to present the cluster as a single machine.
Unlike other process VMs, these systems do not provide a specific programming language, but are embedded in an existing language; typically such a system provides bindings for several languages (e.g.,
C and
Fortran). Examples are
Parallel Virtual Machine (PVM) and
Message Passing Interface (MPI). They are not strictly virtual machines because the applications running on top still have access to all OS services and are therefore not confined to the system model.
History
Both system virtual machines and process virtual machines date to the 1960s and continue to be areas of active development.
''System virtual machines'' grew out of
time-sharing, as notably implemented in the
Compatible Time-Sharing System (CTSS). Time-sharing allowed multiple users to use a computer
concurrently: each program appeared to have full access to the machine, but only one program was executed at the time, with the system switching between programs in time slices, saving and restoring state each time. This evolved into virtual machines, notably via IBM's research systems: the
M44/44X, which used
partial virtualization, and the
CP-40
CP-40 was a research precursor to CP-67, which in turn was part of IBM's then-revolutionary CP 67CMS – a virtual machine/virtual memory time-sharing operating system for the IBM System/360 Model 67, and the parent of IBM's VM family. CP-40 ran ...
and
SIMMON, which used
full virtualization, and were early examples of
hypervisors. The first widely available virtual machine architecture was the
CP-67/CMS (see
History of CP/CMS for details). An important distinction was between using multiple virtual machines on one host system for time-sharing, as in M44/44X and CP-40, and using one virtual machine on a host system for prototyping, as in SIMMON.
Emulators, with hardware emulation of earlier systems for compatibility, date back to the
IBM System/360
The IBM System/360 (S/360) is a family of mainframe computer systems that was announced by IBM on April 7, 1964, and delivered between 1965 and 1978. It was the first family of computers designed to cover both commercial and scientific applic ...
in 1963,
while the software emulation (then-called "simulation") predates it.
''Process virtual machines'' arose originally as abstract platforms for an
intermediate language used as the
intermediate representation of a program by a
compiler
In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs tha ...
; early examples date to around 1966. An early 1966 example was the
O-code machine, a virtual machine that executes
O-code (object code) emitted by the
front end of the
BCPL
BCPL ("Basic Combined Programming Language") is a procedural, imperative, and structured programming language. Originally intended for writing compilers for other languages, BCPL is no longer in common use. However, its influence is still ...
compiler. This abstraction allowed the compiler to be easily ported to a new architecture by implementing a new
back end that took the existing O-code and compiled it to machine code for the underlying physical machine. The
Euler language used a similar design, with the intermediate language named ''P'' (portable).
This was popularized around 1970 by
Pascal
Pascal, Pascal's or PASCAL may refer to:
People and fictional characters
* Pascal (given name), including a list of people with the name
* Pascal (surname), including a list of people and fictional characters with the name
** Blaise Pascal, Frenc ...
, notably in the
Pascal-P system (1973) and
Pascal-S compiler (1975), in which it was termed
p-code and the resulting machine as a
p-code machine. This has been influential, and virtual machines in this sense have been often generally called p-code machines. In addition to being an intermediate language, Pascal p-code was also executed directly by an interpreter implementing the virtual machine, notably in
UCSD Pascal
UCSD Pascal is a Pascal programming language system that runs on the UCSD p-System, a portable, highly machine-independent operating system. UCSD Pascal was first released in 1977. It was developed at the University of California, San Diego (U ...
(1978); this influenced later interpreters, notably the
Java virtual machine (JVM). Another early example was
SNOBOL4 (1967), which was written in the SNOBOL Implementation Language (SIL), an assembly language for a virtual machine, which was then targeted to physical machines by transpiling to their native assembler via a
macro assembler.
Macros have since fallen out of favor, however, so this approach has been less influential. Process virtual machines were a popular approach to implementing early microcomputer software, including
Tiny BASIC and adventure games, from one-off implementations such as
Pyramid 2000 to a general-purpose engine like
Infocom's
z-machine, which
Graham Nelson argues is "possibly the most portable virtual machine ever created".
Significant advances occurred in the implementation of
Smalltalk-80,
particularly the Deutsch/Schiffmann implementation
which pushed
just-in-time (JIT) compilation forward as an implementation approach that uses process virtual machine.
Later notable Smalltalk VMs were
VisualWorks
VisualWorks is a cross-platform implementation of the Smalltalk language. It is implemented as a development system based on "images", which are dynamic collections of software objects, each contained in a system image.
The lineage of VisualWorks ...
, the
Squeak Virtual Machine
Squeak is an object-oriented, class-based, and reflective programming language. It was derived from Smalltalk-80 by a group that included some of Smalltalk-80's original developers, initially at Apple Computer, then at Walt Disney Imagineerin ...
,
and
Strongtalk.
A related language that produced a lot of virtual machine innovation was the
Self
The self is an individual as the object of that individual’s own reflective consciousness. Since the ''self'' is a reference by a subject to the same subject, this reference is necessarily subjective. The sense of having a self—or ''selfhoo ...
programming language,
which pioneered
adaptive optimization
Adaptive optimization is a technique in computer science that performs dynamic recompilation of portions of a program based on the current execution profile. With a simple implementation, an adaptive optimizer may simply make a trade-off between ...
and
generational garbage collection. These techniques proved commercially successful in 1999 in the
HotSpot Java virtual machine.
Other innovations include having a register-based virtual machine, to better match the underlying hardware, rather than a stack-based virtual machine, which is a closer match for the programming language; in 1995, this was pioneered by the
Dis virtual machine for the
Limbo language. OpenJ9 is an alternative for HotSpot JVM in OpenJDK and is an open source eclipse project claiming better startup and less resource consumption compared to HotSpot.
Full virtualization
In full virtualization, the virtual machine simulates enough hardware to allow an unmodified "guest" OS (one designed for the same
instruction set) to be run in isolation. This approach was pioneered in 1966 with the IBM
CP-40
CP-40 was a research precursor to CP-67, which in turn was part of IBM's then-revolutionary CP 67CMS – a virtual machine/virtual memory time-sharing operating system for the IBM System/360 Model 67, and the parent of IBM's VM family. CP-40 ran ...
and
CP-67, predecessors of the
VM family.
Examples outside the mainframe field include
Parallels Workstation
Parallels Workstation is the first commercial software product released by Parallels, Inc., a developer of desktop and server virtualization software. The Workstation software consists of a virtual machine suite for Intel x86-compatible computer ...
,
Parallels Desktop for Mac
Parallels Desktop for Mac is software providing hardware virtualization for Macintosh computers with Intel processors, and since version 16.5 also for Apple silicon-based Macintosh computers. It is developed by Parallels, since 2018 a subsidiary ...
,
VirtualBox,
Virtual Iron,
Oracle VM,
Virtual PC,
Virtual Server,
Hyper-V,
VMware Workstation,
VMware Server (discontinued, formerly called GSX Server),
VMware ESXi,
QEMU,
Adeos, Mac-on-Linux, Win4BSD,
Win4Lin Pro, and
Egenera vBlade technology.
Hardware-assisted virtualization
In hardware-assisted virtualization, the hardware provides architectural support that facilitates building a virtual machine monitor and allows guest OSes to be run in isolation.
Hardware-assisted virtualization was first introduced on the IBM System/370 in 1972, for use with
VM/370
VM (often: VM/CMS) is a family of IBM virtual machine operating systems used on IBM mainframes System/370, System/390, zSeries, System z and compatible systems, including the Hercules emulator for personal computers.
The following ver ...
, the first virtual machine operating system offered by IBM as an official product.
[Randal, A. (2019). The Ideal Versus the Real: Revisiting the History of Virtual Machines and Containers.]
In 2005 and 2006,
Intel
Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California. It is the world's largest semiconductor chip manufacturer by revenue, and is one of the developers of the x86 ser ...
and
AMD provided additional hardware to support virtualization. Sun Microsystems (now
Oracle Corporation
Oracle Corporation is an American multinational computer technology corporation headquartered in Austin, Texas. In 2020, Oracle was the third-largest software company in the world by revenue and market capitalization. The company sells da ...
) added similar features in their
UltraSPARC T-Series processors in 2005. Examples of virtualization platforms adapted to such hardware include
KVM,
VMware Workstation,
VMware Fusion,
Hyper-V,
Windows Virtual PC,
Xen,
Parallels Desktop for Mac
Parallels Desktop for Mac is software providing hardware virtualization for Macintosh computers with Intel processors, and since version 16.5 also for Apple silicon-based Macintosh computers. It is developed by Parallels, since 2018 a subsidiary ...
,
Oracle VM Server for SPARC
An oracle is a person or agency considered to provide wise and insightful counsel or prophetic predictions, most notably including precognition of the future, inspired by deities. As such, it is a form of divination.
Description
The word ''o ...
,
VirtualBox and
Parallels Workstation
Parallels Workstation is the first commercial software product released by Parallels, Inc., a developer of desktop and server virtualization software. The Workstation software consists of a virtual machine suite for Intel x86-compatible computer ...
.
In 2006, first-generation 32- and 64-bit x86 hardware support was found to rarely offer performance advantages over software virtualization.
Operating-system-level virtualization
In operating-system-level virtualization, a physical server is virtualized at the operating system level, enabling multiple isolated and secure virtualized servers to run on a single physical server. The "guest" operating system environments share the same running instance of the operating system as the host system. Thus, the same
operating system kernel
The kernel is a computer program at the core of a computer's operating system and generally has complete control over everything in the system. It is the portion of the operating system code that is always resident in memory and facilitates ...
is also used to implement the "guest" environments, and applications running in a given "guest" environment view it as a stand-alone system. The pioneer implementation was
FreeBSD jails; other examples include
Docker,
Solaris Containers,
OpenVZ
OpenVZ (Open Virtuozzo) is an operating-system-level virtualization technology for Linux. It allows a physical server to run multiple isolated operating system instances, called containers, virtual private servers (VPSs), or virtual environmen ...
,
Linux-VServer,
LXC
Linux Containers (LXC) is an operating-system-level virtualization method for running multiple isolated Linux systems (containers) on a control host using a single Linux kernel.
The Linux kernel provides the cgroups functionality that allows ...
, AIX
Workload Partitions
AIX Workload partitions (WPARs) are a software implementation of operating system-level virtualization technology introduced in the IBM's AIX 6.1 operating system that provides application environment isolation and resource control.
WPARs are s ...
, Parallels Virtuozzo Containers, and
iCore Virtual Accounts.
See also
*
Amazon Machine Image
*
Desktop virtualization
*
Linux containers
OS-level virtualization is an operating system (OS) paradigm in which the kernel allows the existence of multiple isolated user space instances, called ''containers'' (LXC, Solaris containers, Docker, Podman), ''zones'' (Solaris containers), ''v ...
*
Native development kit
Android software development is the process by which applications are created for devices running the Android operating system. Google states that "Android apps can be written using Kotlin, Java, and C++ languages" using the Android software d ...
*
Paravirtualization
*
Storage hypervisor
Software-defined storage (SDS) is a marketing term for computer data storage software for policy-based provisioning and management of data storage independent of the underlying hardware. Software-defined storage typically includes a form of storag ...
*
Universal Turing machine
*
Virtual appliance
*
Virtual backup appliance
VMware Infrastructure is a collection of virtualization products from VMware (a division of Dell Technologies). Virtualization is an abstraction layer that decouples hardware from operating systems. The VMware Infrastructure suite allows enterp ...
*
Virtual disk image
*
Virtual DOS machine (VDM)
*
Virtual machine escape
References
Further reading
* James E. Smith, Ravi Nair, ''Virtual Machines: Versatile Platforms For Systems And Processes'', Morgan Kaufmann, May 2005, , 656 pages (covers both process and system virtual machines)
* Craig, Iain D. ''Virtual Machines''.
Springer, 2006, , 269 pages (covers only process virtual machines)
External links
*
Sandia National Laboratories Runs 1 Million Linux Kernels as Virtual MachinesThe design of the Inferno virtual machine by Phil Winterbottom and Rob Pike
{{DEFAULTSORT:Virtual Machine
Operating system technology
Programming language implementation