Virtual machine
In computing, a virtual machine (VM) is an emulation In some respects, a system virtual machine can be con-
of a computer system. Virtual machines are based on sidered a generalization of the concept of virtual memory
computer architectures and provide functionality of a that historically preceded it. IBM’s CP/CMS, the first
physical computer. Their implementations may involve systems to allow full virtualization, implemented time
specialized hardware, software, or a combination. sharing by providing each user with a single-user operat-
There are different kinds of virtual machines, each with ing system, the Conversational Monitor System (CMS).
different functions: Unlike virtual memory, a system virtual machine enti-
tled the user to write privileged instructions in their code.
• System virtual machines (also termed full virtualiza- This approach had certain advantages, such as adding in- [2]
tion VMs) provide a substitute for a real machine. put/output devices not allowed by the standard system.
They provide functionality needed to execute entire As technology evolves virtual memory for purposes of
operating systems. A hypervisor uses native exe- virtualization, new systems of memory overcommitment
cution to share and manage hardware, allowing for may be applied to manage memory sharing among mul-
multiple environments which are isolated from one tiple virtual machines on one computer operating sys-
another, yet exist on the same physical machine. tem. It may be possible to share memory pages that have
Modern hypervisors use hardware-assisted virtual- identical contents among multiple virtual machines that
ization, virtualization-specific hardware, primarily run on the same physical machine, what may result in
from the host CPUs. mapping them to the same physical page by a technique
termed Kernel SamePage Merging. This is especially
• Process virtual machines are designed to execute
useful for read-only pages, such as those holding code
computer programs in a platform-independent en-
segments, which is the case for multiple virtual machines
vironment.
running the same or similar software, software libraries,
web servers, middleware components, etc. The guest op-
Some virtual machines, such as QEMU, are designed to
erating systems do not need to be compliant with the host
also emulate different architectures and allow execution
hardware, thus making it possible to run different operat-
of software applications and operating systems written
ing systems on the same computer (e.g., Windows, Linux,
for another CPU or architecture. Operating-system-level
or prior versions of an operating system) to support future
virtualization allows the resources of a computer to be
software.[3]
partitioned via the kernel's support for multiple isolated
user space instances, which are usually called containers The use of virtual machines to support separate guest op-
and may look and feel like real machines to the end users. erating systems is popular in regard to embedded systems.
A typical use would be to run a real-time operating sys-
tem simultaneously with a preferred complex operating
1 Definitions system, such as Linux or Windows. Another use would be
for novel and unproven software still in the developmen-
tal stage, so it runs inside a sandbox. Virtual machines
A VM or virtual machine was originally defined by Popek
have other advantages for operating system development,
and Goldberg as “an efficient, isolated duplicate of a
and may include improved debugging access and faster
real computer machine.” Current use includes virtual ma-
reboots.[4]
chines which have no direct correspondence to any real
hardware.[1] Multiple VMs running their own guest operating system
are frequently engaged for server consolidation.[5]
1.1 System virtual machines
See also: Hardware virtualization and Comparison of 2 History
platform virtualization software
See also: History of CP/CMS and Timeline of virtual-
The desire to run multiple operating systems was the ization development
initial motive for virtual machines, so as to allow time-
sharing among several single-tasking operating systems. Both system virtual machines and process virtual ma-
1
2 3 FULL VIRTUALIZATION
chines date to the 1960s, and continue to be areas of ac- Significant advances occurred in the implementation of
tive development. Smalltalk−80,[11] particularly the Deutsch/Schiffmann
[12]
System virtual machines grew out of time-sharing, as no- implementation which pushed just-in-time (JIT) com-
tably implemented in the Compatible Time-Sharing Sys- pilation forward as an implementation
[13]
approach that uses
tem (CTSS). Time-sharing allowed multiple users to use process virtual machine. Later notable Smalltalk VMs
[14]
a computer concurrently: each program appeared to have were VisualWorks, the Squeak Virtual Machine and
[15]
full access to the machine, but only one program was exe- Strongtalk. A related language that produced a lot of
cuted at the time, with the system switching between pro- virtual machine innovation was the Self programming
language,[16] which pioneered adaptive optimization[17]
grams in time slices, saving and restoring state each time.
This evolved into virtual machines, notably via IBM’s re- and generational garbage collection. These techniques
proved commercially successful in 1999 in the HotSpot
search systems: the M44/44X, which used partial virtu- [18]
alization, and the CP-40 and SIMMON, which used full Java virtual machine. Other innovations include hav-
ing a register-based virtual machine, to better match the
virtualization and were early examples of hypervisors.
The first widely available virtual machine architecture underlying hardware, rather than a stack-based virtual
machine, which is a closer match for the programming
was the CP-67/CMS; see History of CP/CMS for details.
An important distinction was between using multiple vir- language; in 1995, this was pioneered by the Dis virtual
tual machines on one host system for time-sharing, as in machine for the Limbo language.
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 compati- 3 Full virtualization
bility, date back to the IBM 360 in 1963,[6][7] while the
software emulation (then-called “simulation”) predates it.
Main article: Full virtualization
Process virtual machines arose originally as abstract In full virtualization, the virtual machine simulates
platforms for an intermediate language used as the
intermediate representation of a program by a compiler;
early examples date to around 1966. An early 1966 ex- Hardware (CPU, Memory, NIC, Disk)
ample was the O-code machine, a virtual machine which Hypervisor (Hyper-V, Xen, ESX Server)
executes O-code (object code) emitted by the front end
Application Application Application
of the BCPL compiler. This abstraction allowed the com-
piler to be easily ported to a new architecture by imple-
menting a new back end that took the existing O-code and Guest OS Guest OS Guest OS
compiled it to machine code for the underlying physical
machine. The Euler language used a similar design, with Virtual Hardware Virtual Hardware Virtual Hardware
the intermediate language named P (portable).[8] This
was popularized around 1970 by Pascal, 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 (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.[9] Macros have since fallen out of Logical diagram of full virtualization.
favor, however, so this approach has been less influen-
tial. Process virtual machines were a popular approach enough hardware to allow an unmodified “guest” OS (one
to implementing early microcomputer software, includ- designed for the same instruction set) to be run in isola-
ing Tiny BASIC and adventure games, from one-off im- tion. This approach was pioneered in 1966 with the IBM
plementations such as Pyramid 2000 to a general-purpose CP-40 and CP-67, predecessors of the VM family.
engine like Infocom's z-machine, which Graham Nelson
argues is “possibly the most portable virtual machine ever Examples outside the mainframe field include Parallels
created”.[10] Workstation, Parallels Desktop for Mac, VirtualBox,
Virtual Iron, Oracle VM, Virtual PC, Virtual Server,
3
Hyper-V, VMware Workstation, VMware Server (dis- • Native development kit
continued, formerly called GSX Server), VMware ESXi,
QEMU, Adeos, Mac-on-Linux, Win4BSD, Win4Lin • Storage hypervisor
Pro, and Egenera vBlade technology.
• Universal Turing machine
• Virtual appliance
3.1 Hardware-assisted virtualization
• Virtual backup appliance
Main article: Hardware-assisted virtualization
• Virtual disk image
In hardware-assisted virtualization, the hardware pro- • Virtual machine escape
vides architectural support that facilitates building a vir-
tual machine monitor and allows guest OSes to be run
in isolation.[19] Hardware-assisted virtualization was first 6 References
introduced on the IBM System/370 in 1972, for use with
VM/370, the first virtual machine operating system. [1] Smith, James; Nair, Ravi (2005). “The Architecture of
In 2005 and 2006, Intel and AMD provided additional Virtual Machines”. Computer. IEEE Computer Society.
hardware to support virtualization. Sun Microsystems 38 (5): 32–38. doi:10.1109/MC.2005.173.
(now Oracle Corporation) added similar features in their [2] Smith and Nair, pp. 395–396
UltraSPARC T-Series processors in 2005. Examples of
virtualization platforms adapted to such hardware include [3] Oliphant, Patrick. “Virtual Machines”. VirtualComput-
KVM, VMware Workstation, VMware Fusion, Hyper-V, ing. Archived from the original on 2016-07-29. Retrieved
Windows Virtual PC, Xen, Parallels Desktop for Mac, 23 September 2015. Some people use that capability to
Oracle VM Server for SPARC, VirtualBox and Parallels set up a separate virtual machine running Windows on a
Workstation. Mac, giving them access to the full range of applications
available for both platforms.
In 2006, first-generation 32- and 64-bit x86 hardware
support was found to rarely offer performance advantages [4] “Super Fast Server Reboots – Another reason Virtualiza-
over software virtualization.[20] tion rocks”. vmwarez.com. May 9, 2006. Archived from
the original on 2006-06-14. Retrieved 2013-06-14.
[5] “Server Consolidation and Containment With Virtual In-
4 Operating-system-level virtual- frastructure” (PDF). VMware. 2007. Retrieved 2015-09-
29.
ization
[6] Pugh, Emerson W. (1995). Building IBM: Shaping an In-
dustry and Its Technology. MIT. p. 274. ISBN 0-262-
Main article: Operating-system-level virtualization 16147-8.
[7] Pugh, Emerson W.; et al. (1991). IBM’s 360 and Early
In operating-system-level virtualization, a physical server
370 Systems. MIT. ISBN 0-262-16123-0. pages 160–161
is virtualized at the operating system level, enabling mul-
tiple isolated and secure virtualized servers to run on a [8] Wirth, N.; Weber, H. (1966). EULER: a generalization
single physical server. The “guest” operating system en- of ALGOL, and its formal definition: Part II, Communica-
vironments share the same running instance of the oper- tions of the Association for Computing Machinery, Vol.9,
ating system as the host system. Thus, the same operating No.2, pp.89–99. New York: ACM.
system kernel is also used to implement the “guest” en-
[9] Griswold, Ralph E. The Macro Implementation of
vironments, and applications running in a given “guest” SNOBOL4. San Francisco, CA: W. H. Freeman and Com-
environment view it as a stand-alone system. The pi- pany, 1972 (ISBN 0-7167-0447-1), Chapter 1.
oneer implementation was FreeBSD jails; other exam-
ples include Docker, Solaris Containers, OpenVZ, Linux- [10] Nelson, Graham. “About Interpreters”. Inform website.
VServer, LXC, AIX Workload Partitions, Parallels Vir- Retrieved 2009-11-07.
tuozzo Containers, and iCore Virtual Accounts.
[11] Goldberg, Adele; Robson, David (1983). Smalltalk-80:
The Language and its Implementation. Addison-Wesley
Series in Computer Science. Addison-Wesley. ISBN 0-
5 See also 201-11371-6.
[12] Deutsch, L. Peter; Schiffman, Allan M. (1984). “Efficient
• Amazon Machine Image implementation of the Smalltalk-80 system”. POPL. Salt
Lake City, Utah: ACM. doi:10.1145/800017.800542.
• Linux Containers ISBN 0-89791-125-3.
4 8 EXTERNAL LINKS
[13] Aycock, John (2003). “A brief history of just-in- 8 External links
time”. ACM Comput. Surv. 35 (2): 97–113.
doi:10.1145/857076.857077. • The Reincarnation of Virtual Machines, Article on
[14] Ingalls, Dan; Kaehler, Ted; Maloney, John; Wallace, ACM Queue by Mendel Rosenblum, Co-Founder,
Scott; Kay, Alan (1997). “Back to the future: the story VMware
of Squeak, a practical Smalltalk written in itself”. OOP-
SLA '97: Proceedings of the 12th ACM SIGPLAN confer- • Sandia National Laboratories Runs 1 Million Linux
ence on Object-oriented programming, systems, languages, Kernels as Virtual Machines
and applications. New York, NY, USA: ACM Press. pp.
• The design of the Inferno virtual machine by Phil
318–326. doi:10.1145/263698.263754. ISBN 0-89791-
908-4. Winterbottom and Rob Pike
[15] Bracha, Gilad; Griswold, David (1993). “Strongtalk: • Software Portability by Virtual Machine Emulation
Typechecking Smalltalk in a Production Environment”. by Stefan Vorkoetter
Proceedings of the Eighth Annual Conference on Object-
oriented Programming Systems, Languages, and Applica-
• Create new Virtual Machine in Windows Azure by
tions. OOPSLA '93. New York, NY, USA: ACM. pp. Rahul Vijay Manekari
215–230. doi:10.1145/165854.165893. ISBN 978-0-
• A Virtual Machine for building Virtual Machines
89791-587-8.
[16] Ungar, David; Smith, Randall B (December 1987). “Self:
The power of simplicity”. ACM SIGPLAN Notices. 22:
227–242. doi:10.1145/38807.38828. ISSN 0362-1340.
[17] Hölzle, Urs; Ungar, David (1994). “Optimizing
dynamically-dispatched calls with run-time type feed-
back”. PLDI. Orlando, Florida, United States: ACM. pp.
326–336. doi:10.1145/178243.178478. ISBN 0-89791-
662-X.
[18] Paleczny, Michael; Vick, Christopher; Click, Cliff
(2001). “The Java HotSpot server compiler”. Proceed-
ings of the Java Virtual Machine Research and Technol-
ogy Symposium on Java Virtual Machine Research and
Technology Symposium – Volume 1. Monterey, Califor-
nia: USENIX Association.
[19] Uhlig, R. et al.; “Intel virtualization technology,” Com-
puter , vol.38, no.5, pp. 48–56, May 2005
[20] A Comparison of Software and Hardware Techniques
for x86 Virtualization, Keith Adams and Ole Agesen,
VMWare, ASPLOS’06 21–25 October 2006, San Jose,
California, USA “Surprisingly, we find that the first-
generation hardware support rarely offers performance
advantages over existing software techniques. We ascribe
this situation to high VMM/guest transition costs and a
rigid programming model that leaves little room for soft-
ware flexibility in managing either the frequency or cost
of these transitions.”
7 Further reading
• James E. Smith, Ravi Nair, Virtual Machines: Ver-
satile Platforms For Systems And Processes, Morgan
Kaufmann, May 2005, ISBN 1-55860-910-5, 656
pages (covers both process and system virtual ma-
chines)
• Craig, Iain D. Virtual Machines. Springer, 2006,
ISBN 1-85233-969-1, 269 pages (covers only pro-
cess virtual machines)
5
9 Text and image sources, contributors, and licenses
9.1 Text
• Virtual machine Source: https://en.wikipedia.org/wiki/Virtual_machine?oldid=784135355 Contributors: Tobias Hoevekamp, Derek
Ross, WojPob, Zundark, Espen, Robertl30, Andre Engels, SimonP, Hannes Hirzel, Hirzel, K.lee, RTC, EddEdmondson, Fuzzie, Norm,
Haakon, Speuler, Charles Matthews, Chatool, Zoicon5, SatyrTN, Didactylos, Jake Nelson, Maximus Rex, Furrykef, Jnc, Bevo, Robbot,
Nurg, Samrolken, Academic Challenger, Rholton, Wlievens, Hadal, Xanzzibar, Tea2min, Giftlite, Thv, Brouhaha, MaGioZal, Jhf, Gil-
gamesh~enwiki, Mboverload, AlistairMcMillan, VampWillow, Uzume, Tagishsimon, Wmahan, Bact, J~enwiki, Beland, Icairns, Marc
Mongenet, Picapica, Chmod007, Zondor, Thorwald, Porges, Ta bu shi da yu, Shipmaster, RossPatterson, Discospinster, Michal Jurosz,
Notinasnaid, Brynosaurus, Leif, Etz Haim, Agoode, John Vandenberg, Flxmghvgvk, R. S. Shaw, Jakew, Hackwrench, Guy Harris, Patrick-
Fisher, Sl, Docboat, Tobyc75, Mcsee, Lost.goblin, RHaworth, Ruud Koot, Tabletop, BD2412, Terryn3, SpiralOut, Kbdank71, Phoenix-
forgotten, Ketiltrout, Rjwilmsi, Amire80, Trlovejoy, Jeffrey Henning, ScottJ, Fred Bradstadt, Maxim Razin, StuartBrady, FlaBot, Mga,
Ewlyahoocom, Intgr, Ahunt, Moocha, Pinecar, YurikBot, Pcoulombeau, Crazytales, Martinhenz, Arado, Pi Delport, Jengelh, Gaius Cor-
nelius, Bovineone, EngineerScotty, Welsh, Mjchonoles, Lomedae, DGJM, Falcon9x5, Wknight94, Abune, Josh3580, Ansud~enwiki, Tvar-
noe~enwiki, Back ache, JLaTondre, ViperSnake151, GrinBot~enwiki, SmackBot, Mmernex, Gribeco, Clpo13, BurntSky, Brick Thrower,
Commander Keane bot, Hmains, Bluebot, MalafayaBot, Jerome Charles Potts, Nbarth, DHN-bot~enwiki, Colonies Chris, Krallja, Ninten-
dude, Can't sleep, clown will eat me, Makewa, Frap, Neo139, JonHarder, Zoonfafer, Kennovak, Zvar, Phaedriel, B^4, Corby, Tossrock,
Duckbill, MichaelBillington, Wybot, FlyHigh, Spinality, Lester, Doug Bell, Gobonobo, Soumyasch, Breno, NJA, Ryulong, Mrozlog, Drefty-
mac, UncleDouggie, Arto B, Courcelles, Bclaremont, FatalError, Raysonho, Elendal, Mblumber, MC10, Quibik, Torc2, Dayyan, Thijs!bot,
Kubanczyk, Coelacan, Hervegirod, TheWhiteCrowsShadow, K001, JeffV, JAnDbot, MER-C, Albany NY, Bradmkjr~enwiki, Fuchsias,
JamesBWatson, Swpb, Gusunyzu, Twsx, Sachingopal, Japo, Doesnotexist, P Escobar, Donsez, Mi5key, Gwern, MartinBot, Hlsu, R'n'B,
Cyprien44, Jesant13, Raise exception, Pterre, Jcea, VolkovBot, Part Deux, MenasimBot, Xandell, TXiKiBoT, Aatch, Oshwah, Quackdave,
Slowish guitar, Rponamgi, Cfbolz, Pmedema, BwDraco, VisionQwest, Bejer, Cucinotta, Dirkbb, Dpleibovitz, YordanGeorgiev, Salty-
Boatr, Heiser, SieBot, Winchelsea, Missy Prissy, Jerryobject, Hello71, Alexey.noskov, XMNboy, Smearly, Priyakishan, Anchor Link Bot,
Martarius, ClueBot, Alksentrs, Adamin91, Nonxero, DragonBot, PixelBot, MorrisRob, Posix memalign, A Pirard, Muro Bot, BOTarate,
Bob13377, SF007, Vayalir, Galzigler, Atxbyea, Dsimic, Mortense, DOI bot, Faltschuler, AkhtaBot, Elsendero, Lclam, Cst17, MrOllie,
Glane23, Mob590, Jasper Deng, Jarble, Luckas-bot, Yobot, Pcap, Jerebin, Wonderfl, Peter Flass, Fultheim, AnomieBOT, Houselifter,
ThaddeusB, Jim1138, JamesBKenney, LirazSiri, Materialscientist, Larry.Imperas, Ms.wiki.us, ArthurBot, Sirgorpster, Terrivsm, Pmlined-
itor, Bugefun, Stevenbshaffer, Nits.singla, Zaokski, Prari, FrescoBot, W Nowicki, Jc3s5h, Saehrimnir, Pipoetmollo, Expertour, Helenistic,
Skyerise, Txt.file, Trappist the monk, Rangsynth, Boogaart, Vrenator, Diannaa, Virtimo, EmausBot, Jjacobso, Dewritech, Barnet.Herts,
Jasonanaggie, Pome wiki, Lambda-mon key, HiW-Bot, Grondilu, Cogiati, Josve05a, Wackywace, Dznidarsic, L Kensington, ,
MainFrame, Aravindsrivatsa, Kinkreet, Bhaskarmnnit, Petrb, ClueBot NG, Matthiaspaul, Strcat, Nickholbrook, BigTheta, Electriccat-
fish2, BG19bot, Murry1975, Kendall-K1, Mark Arsten, Compfreak7, Mariraja2007, Neel.pant18, Baxter4173, Thegreatgrabber, Sondhic,
David.moreno72, ChrisGualtieri, Amirhossini, Earl King Jr., Codename Lisa, Pavel Tkachuk, Dbasellc, Frosty, Me, Myself, and I are
Here, BurritoBazooka, Stefmorrow, Epicgenius, Tdshepard, François Robere, Tljplslc, Comp.arch, Spyglasses, Melody Lavender, Gin-
suloft, Reda cosi, HarlemChocolateShake, Dough34, Hrbm14, XHeliotrope, Lagoset, Monkbot, Pedrotangtang, CerealKillerYum, Snow-
books1419, BlackCat1978, Eurodyne, Fatdaddy12222, Guettli, PerfectBike, Mr. Artem Kerpatenko, , Intercambrian, Unequivo-
calAmbivalence, Kethrus II, Daveprochnow, 1 bicbluepen 1, Fmadd, NoToleranceForIntolerance, Marvellous Spider-Man, Ashleyeinspahr
and Anonymous: 462
9.2 Images
• File:Desktop_computer_clipart_-_Yellow_theme.svg Source: https://upload.wikimedia.org/wikipedia/commons/d/d7/Desktop_
computer_clipart_-_Yellow_theme.svg License: CC0 Contributors: https://openclipart.org/detail/17924/computer Original artist: AJ from
openclipart.org
• File:Hardware_Virtualization_(copy).svg Source: https://upload.wikimedia.org/wikipedia/commons/0/08/Hardware_Virtualization_
%28copy%29.svg License: Public domain Contributors: Own work Original artist: John Aplessed
• File:Internet_map_1024.jpg Source: https://upload.wikimedia.org/wikipedia/commons/d/d2/Internet_map_1024.jpg License: CC BY
2.5 Contributors: Originally from the English Wikipedia; description page is/was here. Original artist: The Opte Project
• File:Question_book-new.svg Source: https://upload.wikimedia.org/wikipedia/en/9/99/Question_book-new.svg License: Cc-by-sa-3.0
Contributors:
Created from scratch in Adobe Illustrator. Based on Image:Question book.png created by User:Equazcion Original artist:
Tkgd2007
9.3 Content license
• Creative Commons Attribution-Share Alike 3.0