Both system virtual machines and process virtual machines date to the 1960s and remain 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 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 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; early examples date to around 1964 with the
META II compiler-writing system using it for both syntax description and target code generation. A notable 1966 example was the
O-code machine, a virtual machine that executes
O-code (object code) emitted by the
front end of the
BCPL 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, 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. 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, the
Squeak Virtual Machine, and
Strongtalk. A related language that produced a lot of virtual machine innovation was the
Self programming language, which pioneered
adaptive optimization and
generational garbage collection. These techniques proved commercially successful in 1999 in the
HotSpot Java virtual machine. Other innovations include 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. == Virtualization techniques ==