Comparison of application virtualization software: Difference between revisions

Content deleted Content added
Citation bot (talk | contribs)
Added title. Changed bare reference to CS1/2. | Use this bot. Report bugs. | Suggested by Folkezoft | Linked from User:Folkezoft/sandbox | #UCB_webform_linked 200/978
 
(264 intermediate revisions by more than 100 users not shown)
Line 1:
{{short description|None}}
This '''comparison of Application Virtual Machines''' lists some of the common software [[virtual machine]]s that implement the concept of [[Application Virtualization]], typically for the purpose allowing application binaries to be portably run on many different computer architectures and operating systems. The application is usually run on the computer using an [[Interpreter (computing)|interpreter]] or [[Just In Time compilation]].
 
{{more citations needed|date=October 2011}}
==Application Virtual Machines==
'''Application virtualization software''' refers to both application [[virtual machine]]s and software responsible for implementing them. Application virtual machines are typically used to allow application [[bytecode]] to run portably on many different computer architectures and operating systems. The application is usually run on the computer using an [[Interpreter (computing)|interpreter]] or [[just-in-time compilation]] (JIT). There are often several implementations of a given virtual machine, each covering a different set of functions.
{| class="wikitable"
 
! Virtual machine
==Comparison of virtual machines==
! Languages
{{Hatnote|[[JavaScript]] machines not included. See [[List of ECMAScript engines]] to find them.}}
 
The table here summarizes elements for which the virtual machine designs are intended to be efficient, not the list of abilities present in any implementation.
 
{| class="wikitable sortable"
|-
![[Virtual machine]]
![[Model of computation|Machine model]]
![[Memory management]]
![[Secure coding|Code security]]
![[Interpreter (computing)|Interpreter]]
![[Just-in-time compilation|JIT]]
![[Ahead-of-time compilation|AOT]]
![[Shared library|Shared libraries]]
!Common Language [[Object Model]]
![[Dynamic typing]]
|-
! [[Android Runtime]] (ART)
| [[Register machine|register]]
| automatic
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{dunno}}
| {{yes}}
| {{yes}}
|-
! [[Common Language Runtime]] (CLR)
| [[Stack machine|stack]]
| automatic or manual
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
|-
! [[Dis virtual machine|Dis]] ([[Inferno (operating system)|Inferno]])
| [[Register machine|register]]
| automatic
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
|-
! [[DotGNU]] [[Portable.NET]]
| [[Stack machine|stack]]
| automatic or manual
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{no}}
|-
! [[HotSpot (virtual machine)|HotSpot]] [[Java virtual machine|JVM]]
| [[Stack machine|stack]]
| automatic
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{Yes}}
| {{yes}}
| {{yes}}<ref>{{cite web|url=http://jcp.org/en/jsr/detail?id=292 |title=The Java Community Process(SM) Program - JSRs: Java Specification Requests - detail JSR# 292 |publisher=Jcp.org |date= |accessdate=2013-07-04}}</ref>
|-
! [[JikesRVM]]
| [[Stack machine|stack]]
| automatic
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{dunno}}
| {{yes}}
| {{yes}}
|-
! [[LLVM]]
| [[Register machine|register]]
| manual
| {{no}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{no}}
|-
! [[Mono (software)|Mono]]
| [[Stack machine|stack]]
| automatic or manual
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
|-
! [[Parrot virtual machine|Parrot]]
| [[Register machine|register]]
| automatic
| {{no}}
| {{yes}}
| {{no}}<ref>{{cite web|url=http://trac.parrot.org/parrot/wiki/JITRewrite |title=JITRewrite – Parrot |publisher=Trac.parrot.org |date= |accessdate=2013-07-04}}</ref>
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
|-
! [[Dalvik virtual machine|Dalvik]]
| [[Register machine|register]]
| automatic
| {{yes}}
| {{yes}}
| {{yes}}
| {{no}}
| {{dunno}}
| {{no}}
| {{no}}
|-
! [[Squeak]]
| [[Stack machine|stack]]
| automatic
| {{no}}
| {{yes}}
| {{yes}}
| {{no}}
| {{yes}}
| {{no}}
| {{yes}}
|-
! [[BEAM (Erlang virtual machine)|BEAM]] ([[Erlang (programming language)|Erlang]])
| [[Register machine|register]]
| automatic
| {{dunno}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
|-
! [[MoarVM]]
| [[Register machine|register]]
| automatic
| {{dunno}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
|}
 
Virtual machine instructions process data in local variables using a main ''[[model of computation]]'', typically that of a [[stack machine]], [[register machine]], or [[random access machine]] often called the memory machine. Use of these three methods is motivated by different tradeoffs in virtual machines vs physical machines, such as ease of interpreting, compiling, and verifying for security.
 
''[[Memory management]]'' in these portable virtual machines is addressed at a higher level of abstraction than in physical machines. Some virtual machines, such as the popular [[Java virtual machine]]s (JVM), are involved with addresses in such a way as to require safe automatic memory management by allowing the virtual machine to trace pointer references, and disallow machine instructions from manually constructing pointers to memory. Other virtual machines, such as LLVM, are more like traditional physical machines, allowing direct use and manipulation of pointers. [[Common Intermediate Language]] (CIL) offers a hybrid in between, allowing both controlled use of memory (like the JVM, which allows safe automatic memory management), while also allowing an 'unsafe' mode that allows direct pointer manipulation in ways that can violate type boundaries and permission.
 
''Code security'' generally refers to the ability of the portable virtual machine to run code while offering it only a prescribed set of abilities. For example, the virtual machine might only allow the code access to a certain set of functions or data. The same controls over pointers which make automatic memory management possible and allow the virtual machine to ensure typesafe data access are used to assure that a code fragment is only allowed to certain elements of memory and cannot bypass the virtual machine itself. Other security mechanisms are then layered on top as code verifiers, stack verifiers, and other methods.
 
An ''[[Interpreter (computing)|interpreter]]'' allows programs made of virtual instructions to be loaded and run immediately without a potentially costly compile into native machine instructions. Any virtual machine which can be run can be interpreted, so the column designation here refers to whether the design includes provisions for efficient interpreting (for common usage).
 
''[[Just-in-time compilation]]'' (JIT), refers to a method of compiling to native instructions at the latest possible time, usually immediately before or during the running of the program. The challenge of JIT is more one of implementation than of virtual machine design, however, modern designs have begun to make considerations to help efficiency. The simplest JIT methods simply compile to a code fragment similar to an offline compiler. However, more complex methods are often employed, which specialize compiled code fragments to parameters known only at runtime (see [[Adaptive optimization]]).
 
''[[Ahead-of-time compilation]]'' (AOT) refers to the more classic method of using a precompiler to generate a set of native instructions which do not change during the runtime of the program. Because aggressive compiling and optimizing can take time, a precompiled program may launch faster than one which relies on JIT alone for execution. JVM implementations have mitigated this startup cost by initial interpreting to speed launch times, until native code fragments can be generated by JIT.
 
''[[Shared library|Shared libraries]]'' are a facility to reuse segments of native code across multiple running programs. In modern operating systems, this generally means using [[virtual memory]] to share the memory pages containing a shared library across different processes which are protected from each other via [[memory protection]]. It is interesting that aggressive JIT methods such as adaptive optimization often produce code fragments unsuitable for sharing across processes or successive runs of the program, requiring a tradeoff be made between the efficiencies of precompiled and shared code and the advantages of adaptively specialized code. For example, several design provisions of CIL are present to allow for efficient shared libraries, possibly at the cost of more specialized JIT code. The JVM implementation on [[OS X]] uses a Java Shared Archive<ref>[https://developer.apple.com/mac/library/documentation/Java/Conceptual/Java14Development/00-Intro/JavaDevelopment.html Apple docs on OS X use of Java Shared Archive]</ref> to provide some of the benefits of shared libraries.
 
==Comparison of application virtual machine implementations==
 
In addition to the portable virtual machines described above, virtual machines are often used as an execution model for individual scripting languages, usually by an interpreter. This table lists specific virtual machine implementations, both of the above portable virtual machines, and of scripting language virtual machines.
 
{| class="wikitable sortable"
|-
! [[Virtual machine]]
! [[Programming language|Languages]] executed
! Comments
! [[Interpreter (computing)|Interpreter]]
! [[Just-in-time compilation|JIT]]
! Implementation language
! [[Source lines of code|SLoC]]
|-
![[BEAM (Erlang virtual machine)|BEAM]]
! [[Common Language Runtime]]
|[[Erlang (programming language)|Erlang]], [[Elixir (programming language)|Elixir]], [[Gleam (programming language)|Gleam]], [[Cuneiform (programming language)|Cuneiform]], [[LFE (programming language)|LFE]], Clojerl, Luerl
| [[C sharp|C#]], [[Visual Basic .NET]], [[J Sharp|J#]], [[Managed Extensions for C++|Managed C++]], [[IronPython|Python]]
|
| reference implementation by Microsoft
| {{yes}}<ref>{{cite web | title=A closer look at the interpreter - Erlang/OTP | url=https://www.erlang.org/blog/a-closer-look-at-the-interpreter/ }}</ref>
| {{yes}}<ref>{{cite web | title=A first look at the JIT - Erlang/OTP | url=https://www.erlang.org/blog/a-first-look-at-the-jit/ }}</ref>
|Erlang, C, C++
|1561k including [[Open Telecom Platform|OTP]]
|-
! [[ForthCommon virtualLanguage machineRuntime]] (CLR)
| [[ForthC Sharp (programming language)|ForthC#]], [[C++/CLI]], [[F Sharp (programming language)|F#]], [[Visual Basic (.NET)|VB.NET]]
| bytecode is [[Common Intermediate Language|CIL]]; [[.NET]] Core Runtime on GitHub
| {{no}}
| {{yes}}
| C#, C++
|
|-
! [[Adobe Flash Player]] (aka [[Tamarin (software)|Tamarin]])
| [[ActionScript]], [[SWF]] (file format)
| interactive web authoring tool; bytecode is named ''ActionScript Byte Code (.abc)''
| {{yes}}
| {{yes}}
| C++
| 135k (initially released)
|-
! [[Dis virtual machine|Dis]] ([[Inferno (operating system)|Inferno]])
| [[Limbo (programming language)|Limbo]]
| Dis Virtual Machine Specification
| {{yes}}
| {{yes}}
| C
| 15k + 2850 per JIT arch + 500 per host OS
|-
! [[DotGNU]]-Portable.NET
| [[List of CLI languages|CLI languages]] including: [[C Sharp (programming language)|C#]]
| Common Language Runtime clone
| {{no}}
| {{yes}}
| C, C#
|
|-
! [[Forth (programming language)|Forth]]
| [[Forth (programming language)|Forth]]
| Features are simplified, usually include assembler, compiler, text-level and binary-level interpreters, sometimes editor, debugger and OS; compile speed is >20 SKLOC/S, behaves much like JIT.
| {{yes}}
| {{no}}
| Forth, Forth Assembler
| 2.8K to 5.6K; advanced, professional implementations are smaller.
|-
! [[Glulx]]
| Inform 6, Inform 7, others
| [[Glulx]], [[Z-machine|Z-code]]
|
|{{yes}}
|{{no}}
| Various implementations exist
|
|-
|-
! [[Inferno (operating system)|Inferno]]
! [[HHVM]]
| [[Limbo programming language|Limbo]]
| [[PHP]], [[Hack (programming language)|Hack]]
| Is an open-source virtual machine designed for executing programs written in Hack and PHP.
| {{yes}}
| {{yes}}
| C++, OCaml
|
|-
! [[JavaHotSpot (virtual machine)|HotSpot]]
| [[Java (programming language)|Java]], [[GroovyKotlin (programming language)|GroovyKotlin]], [[Jython]], [[Groovy (programming language)|JythonGroovy]], [[JRuby]], [[C (programming language)|JRubyC]], [[C++]], [[Clojure]], [[Scala (programming language)|Scala]] and several others
| [[Java virtual machine|JVM]] reference implementation by Sun; [[OpenJDK]]: code under [[GPL]]; [[IcedTea]]: code and tools under [[GPL]]
| {{yes}}
| {{yes}}
| [[JDK]], [[OpenJDK]] & [[IcedTea]] with regular JIT : Java, C, C++, ASM ; [[IcedTea]] with the "Zero" JIT : Java, C, C++
| HotSpot is around 6500k lines; [[Technology Compatibility Kit|TCK]] is 80k tests and around 1000k lines
|-
! [[Icon (programming language)|Icon]]
! [[LLVM|Low Level Virtual Machine (LLVM)]]
| Icon
| currently [[C (programming language)|C]], [[C++]], Stacker
| Base source code provides both the interpreter as well as an unsupported compile-to-C version. The runtime code, that is shared between the compiler and the interpreter, is written in a variant of C called RTT.
|{{yes}}
|{{no}}
|C, RTT (a custom front-end to C, provided with the base source for Icon).
| ~180k total. (source to bytecode: ~11k, bytecode interpreter: ~46k, iconc: ~23k, common/headers: ~13k, rtt: ~15k)
|-
! [[LLVM]]
| [[C (programming language)|C]], [[C++]], [[Kotlin (programming language)|Kotlin]], [[Objective-C]], [[Swift (programming language)|Swift]], [[Ada (programming language)|Ada]], [[Fortran]], and [[Rust (programming language)|Rust]]
| MSIL, C and C++ output are supported. ActionScript Byte Code output is supported by Adobe Alchemy. bytecode is named "LLVM Bytecode (.bc)". assembly is named "LLVM Assembly Language (*.ll)".
| {{yes}}
| {{yes}}
| C++
| 811k <ref name="ohloh-llvm">[http://www.ohloh.net/p/llvm The LLVM Compiler Infrastructure] {{Webarchive|url=https://web.archive.org/web/20120731043158/http://www.ohloh.net/p/llvm |date=2012-07-31}}, ohloh.net, 2011 November 30</ref>
|-
! [[Lua (programming language)|Lua]]
| Lua
|
| {{yes}}
| LuaJIT
| C
| 13k + 7k LuaJIT
|-
! [[MMIX]]
! [[Lua programming language|Lua]]
| MMIXAL
|
|
|
|
|
|-
! [[AdobeMono Flash Player(software)|Mono]]
| [[List of CLI languages|CLI languages]] including: [[C Sharp (programming language)|C#]], [[Visual Basic (.NET)|VB.NET]], [[IronPython]], [[IronRuby]], and others
| [[ActionScript]], [[SWF]] (file format)
| Common Language Runtime clone
| interactive web authoring tool
| {{yes}}
| {{yes}}
| C#, C
| 2332k
|-
! [[MMIXNekoVM]]
| currently [[NekoVM|Neko]] and [[Haxe]]
| [[MMIX]]AL
|
| {{yes}}
| x86 only
| C
| 46k
|-
! [[Oz (programming language)|Oz]]
! [[NekoVM|Neko virtual machine]]
| Oz, [[Alice (programming language)|Alice]]
| currently [[NekoVM|Neko]] and [[haXe]]
|
|
|
|
|
|-
! [[O-code machine]]
| [[BCPL]]
|
|
|
|
|
|-
! [[p-code machine]]
| [[Pascal (programming language)|Pascal]]
| UCSD Pascal, widespread in late 70s including Apple II
|{{yes}}
|{{no}}
|assembly, Pascal
|
|-
! [[Parrot virtual machine|Parrot]]
| [[Perl#2000–present|Perl 5]], [[Raku (programming language)|Raku]], NQP-rx, [[Parrot intermediary language|PIR]], [[Parrot assembly language|PASM]], [[bytecode|PBC]], [[BASIC]], [[bc (programming language)|bc]], [[C99]], [[ECMAScript]], [[Lisp (programming language)|Lisp]], [[Lua (programming language)|Lua]], [[GNU m4|m4]], [[Tcl]], [[WMLScript]], [[Simple API for XML#XML processing with SAX|XML]], and others
| [[Perl 6]], and others experimentally
|
| {{yes}}
| {{yes}}
| C, Perl
| 111k&nbsp;C, 240k&nbsp;Perl
|-
! [[Perl|Perl virtual machine]]
| [[Perl]]
| [[op-code]] tree walker
| {{yes}}
| {{no}}
| C, Perl
| 175k&nbsp;C, 9k&nbsp;Perl
|-
! [[CPython]]
| [[Python (programming language)|Python]]
|
| {{yes}}
| {{ubl|[[Psyco]]|[[Unladen Swallow]]}}
| C
| 387k&nbsp;C, 368k&nbsp;Python, 10k&nbsp;ASM, 31k&nbsp;Psyco
|-
! [[Portable.NETPyPy]]
| [[C sharp|C#]], [[Visual Basic .NET]], [[J Sharp|J#]], [[Managed Extensions for C++|Managed C++]]
|-
! [[Python (programming language)|Python virtual machine]]
| [[Python (programming language)|Python]]
| [[Self-hosting (compilers)|Self-hosting]] implementation of Python, next generation of [[Psyco]]
| {{yes}}
| {{yes}}
| Python
|
|-
! [[Rubinius]]
| [[Ruby (programming language)|Ruby]]
| Virtual machine for another Ruby implementation
| {{yes}}
| {{yes}}
| C++, Ruby
|
|-
! [[Silverlight]]
| [[C Sharp (programming language)|C#]], [[Visual Basic (.NET)|VB.NET]]
| Micro-version of Microsoft [[.NET Framework]] to let applications run sandboxed inside browser
| {{yes}}
| {{yes}}
| C++
| 7MB (first release)
|-
! [[ScummVM]]
| [[Scumm]]
| computerComputer game engine
|
|
|
|
|-
! [[SECD machine|SECD]]
| [[ISWIM]], [[Lispkit Lisp]]
|
|
|
|
|
|-
! [[Squirrel (programming language)|Squirrel]]
! [[Smalltalk|Smalltalk virtual machine]]
| Squirrel
| [[Smalltalk]]
|
| {{yes}}
| Squirrel_JIT
| C++
| 12k
|-
! [[Smalltalk]]
! [[SQLite|Sqlite virtual machine]]
| Smalltalk
| [[SQLite|Sqlite opcodes]]
|
| virtual database engine
|
|
|
|
|-
! [[SQLite]]
! [[Squeak|Squeak virtual machine]]
| SQLite opcodes
| [[Squeak]]
| Virtual database engine
|
|
|
|
|-
! [[Squeak]]
! [[TrueType|TrueType virtual machine]]
| Squeak [[TrueTypeSmalltalk]]
| [[Self-hosting (compilers)|Self hosting]] implementation of Squeak virtual machine. Rich multi-media support.
| font rendering engine
| {{yes}}
| {{yes|Cog & Exupery}}
| Smalltalk/Slang
| 110k Smalltalk, ~300K C
|-
![[SWI-Prolog]]
|Prolog: [[SWI-Prolog]], [[YAP (Prolog)|YAP]]
|
| {{yes}}
| {{no}}
| C, SWI-Prolog
|
|-
! [[TraceMonkey]]
| JavaScript
| Based on [[Tamarin (software)|Tamarin]]
| {{no}}
| {{yes}}
| C++
| 173k
|-
! [[TrueType]]
| [[TrueType#Hinting language|TrueType]]
| Font rendering engine
| {{yes}}
| {{no}}
| C (typically)
|
|-
! [[Valgrind]]
| [[x86]]/[[x86 -64]] binaries
| checkingChecking of memory accesses and leaks under [[Linux]]
|
|
| C
| 467k <ref name="ohloh-valgrind">[http://www.ohloh.net/p/valgrind Valgrind], ohloh.net, 2011 Nov 30.</ref>
|-
! [[VisualWorks]]
! [[VX32|VX32 virtual machine]]
| [[Smalltalk]]
|
| {{no}}
| {{yes}}
| C
|
|-
! [[Vx32]] virtual machine
| [[x86]] binaries
| Application-level virtualization for native code
| {{no}}
| {{yes}}
|
|
| application-level virtualization for native code
|-
! [[SuperWaba|Waba]]
|
| Virtual machine for small devices, similar to [[Java (programming language)|Java]]
|
|
|
|
|-
! Yet Another Ruby VM ([[YARV]])
! [[Warren Abstract Machine]]
| [[Ruby (programming language)|Ruby]]
| [[Prolog]]
| Virtual machine of the reference implementation for [[Ruby (programming language)|Ruby]] 1.9 and newer versions
|{{yes}}
|{{yes}}
|C
|
|-
! [[Z-machine]]
| [[Z-machine|Z-Code]]
|
|
|
|
|
|-
! [[Zend Engine]]
| [[PHP]]
|
| {{yes}}
| {{no}}
| C
| 75k
|}
 
==See also==
{{div col}}
* [[Comparison of virtual machines]]
* [[Application virtualization]]
* [[Virtualization]]
* [[Language binding]]
* [[Foreign function interface]]
* [[Calling convention]]
* [[Name mangling]]
* [[Application programming interface]] (API)
* [[Application binary interface]] (ABI)
* [[Comparison of platform virtualization software]]
* [[Comparison of Java virtual machines]]
* [[List of Java virtual machines]]
* [[List of ECMAScript engines]]
* [[List of application servers]]
* [[WebAssembly]]
{{div col end}}
 
==References==
{{Reflist}}
 
[[Category:Software comparisons|application virtualization software]]
[[Category:Virtualization software| ]]
 
[[pt:Comparação entre aplicações de virtualização de máquinas]]
[[Category:Virtualization software]]