Comparison of application virtualization software: Difference between revisions

Content deleted Content added
WaldirBot (talk | contribs)
m replace superseded template {{?}} in tables (see talk) / general fixes using AWB
(47 intermediate revisions by 31 users not shown)
Line 1:
{{short description|None}}
{{refimprove|date=October 2011}}
 
'''Application virtualization software''' refers to both application [[virtual machine]]s and software responsible for implementing them. Application virtual machines are typically used for allowing application [[bytecode]] 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]]. There are often several implementations of a given virtual machine, each covering a different functionality footprint.
{{more citations needed|date=October 2011}}
'''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.
 
==Comparison of virtual machines==
{{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 capabilities present in any implementation.
 
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]]
!JIT
![[Ahead-of-time compilation|AOT]]
!Precompilation
![[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]] (CLR)
| [[Stack machine|stack]]
| automatic or manual
| {{yes}}
| {{noyes}}
| {{yes}}
| {{yes}}
Line 37 ⟶ 52:
| {{yes}}
| {{yes}}
| {{noyes}}
| {{noyes}}
|-
! [[DotGNU]] [[Portable.NET]]
| [[Stack machine|stack]]
| automatic or manual
| {{noyes}}
| {{noyes}}
| {{yes}}
| {{yes}}
Line 51 ⟶ 66:
| {{no}}
|-
! [[HotSpot (virtual machine)|HotSpot]] [[Java virtual machine|JVM]]
! [[Java Virtual Machine]] (JVM)
| [[Stack machine|stack]]
| automatic
Line 65 ⟶ 80:
| [[Stack machine|stack]]
| automatic
| {{no}}
| {{no}}
| {{yes}}
| {{noyes}}
| {{yes}}
| {{yes}}
| {{dunno}}
| {{noyes}}
| {{noyes}}
|-
! [[LLVM]]
Line 112 ⟶ 127:
| {{yes}}
| {{yes}}
| {{dunnono}}
| {{dunno}}
| {{no}}
Line 123 ⟶ 138:
| {{yes}}
| {{yes}}
| {{yes|source to bytecodeno}}
| {{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 techniquesmethods is motivated by different tradeoffs in virtual machines vs physical machines, such as ease of interpretationinterpreting, compilationcompiling, and verifiabilityverifying 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]] (CIL) offers a hybrid in between, offeringallowing both controlled use of memory (like the JVM, which allows safe automatic memory management), while also offeringallowing an 'unsafe' mode that allows direct pointer manipulation of pointers 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 only offering it only a prescribed set of capabilitiesabilities. 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 sidestepbypass the virtual machine itself. Other security mechanisms are then layered on top as code verifiers, stack verifiers, and other techniquesmethods.
 
An '''[[Interpreter (computing)|interpreter]]''' allows programs made of virtual instructions to be loaded and immediately run immediately without a potentially costly compilationcompile 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 interpretationinterpreting (for common usage).
 
''[[Just-in-time compilation]] or ''' (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 techniquesmethods simply perform compilationcompile to a code- fragment similar to an offline compiler. However, more complicatedcomplex techniquesmethods are often employed, which specialize compiled code- fragments to parameters that are known only at runtime (see [[Adaptive optimization]]).
 
'''Precompiling'[[Ahead-of-time compilation]]'' (AOT) refers to the more classicalclassic techniquemethod of using an offlinea compilerprecompiler to generate a set of native instructions which do not change during the runtime of the program. Because aggressive compilationcompiling and optimizationoptimizing 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 using interpretationinitial initiallyinterpreting to speed launch times, until native code- fragments can be generated throughby 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 techniquesmethods 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 [[Mac OS X]] uses a Java Shared Archive (<ref>[httphttps://developer.apple.com/mac/library/documentation/Java/Conceptual/Java14Development/00-Intro/JavaDevelopment.html appleApple docs on OS X use of Java Shared Archive])</ref> to provide some of the benefits of shared libraries.
 
==ListComparison 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.
Line 149 ⟶ 186:
{| class="wikitable sortable"
|-
! [[Virtual machine]]
! [[Programming language|Languages]] executed
! Comments
! [[Interpreter (computing)|Interpreter]]
! [[Just-in-time compilation|JIT]]
! Implementation Languagelanguage
! [[Source lines of code|SLoC]]
|-
![[BEAM (Erlang virtual machine)|BEAM]]
! [[Common Language Runtime|CLR]]
| [[C SharpErlang (programming language)|C#Erlang]], [[C++/CLIElixir (programming language)|Elixir]], [[FGleam Sharp(programming language)|Gleam]], [[Cuneiform (programming language)|F#Cuneiform]], [[VisualLFE Basic(programming .NETlanguage)|VB.NETLFE]], Clojerl, Luerl
|
| bytecode is [[Common Intermediate Language|CIL]]
| {{yes}}<ref>https://www.erlang.org/blog/a-closer-look-at-the-interpreter/</ref>
| {{dunno}}
| {{yes}}<ref>https://www.erlang.org/blog/a-first-look-at-the-jit/</ref>
| {{dunno}}
|Erlang, C, C++
|
|1561k including [[Open Telecom Platform|OTP]]
|-
! [[Common Language Runtime]] (CLR)
| [[C Sharp (programming language)|C#]], [[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 (JavaScript enginesoftware)|Tamarin]])
| [[ActionScript]], [[SWF]] (file format)
| interactive web authoring tool.; bytecode is named "''ActionScript Byte Code (.abc)"''
| {{yes}}
| {{yes}}
Line 175 ⟶ 220:
! [[Dis virtual machine|Dis]] ([[Inferno (operating system)|Inferno]])
| [[Limbo (programming language)|Limbo]]
| [http://doc.cat-v.org/inferno/4th_edition/dis_VM_specification Dis Virtual Machine Specification]
| {{yes}}
| {{yes}}
Line 181 ⟶ 226:
| 15k + 2850 per JIT arch + 500 per host OS
|-
! [[DotGNU]]/[[-Portable.NET]]
| [[List of CLI languages|CLI languages]] including: [[C Sharp (programming language)|C#]]
| Clone of Common Language Runtime clone
| {{no}}
| {{yes}}
Line 189 ⟶ 234:
|
|-
! [[Forth virtual(programming machinelanguage)|Forth]]
| [[Forth (programming language)|Forth]]
| Features are simplified, usually include assembler, compiler, text-level and binary-level interpreters, sometimes editor, debugger and OS.; Compilationcompile speedsspeed areis >20 SKLOC/S, and behavebehaves much like JIT.
| {{yes}}
| {{no}}
Line 198 ⟶ 243:
|-
! [[Glulx]]
| Inform 6, Inform 7, others
| [[Glulx]], [[Z-machine|Z-code]]
|
|
|
|
|{{yes}}
|{{no}}
| Various implementations exist
|
|-
|-
! [[HHVM]]
| [[PHP]], [[HACKHack (programming language)|Hack]]
| Is an open-source virtual machine designed for executing programs written in Hack and PHP.
| {{yes}}
Line 214 ⟶ 259:
|
|-
! [[IconHotSpot (programmingvirtual languagemachine)|IconHotSpot]]
| [[Java (programming language)|Java]], [[Kotlin (programming language)|Kotlin]], [[Jython]], [[Groovy (programming language)|Groovy]], [[JRuby]], [[C (programming language)|C]], [[C++]], [[Clojure]], [[Scala (programming language)|Scala]] and several others
| [[Icon (programming language)|Icon]]
| [[Java virtual machine|JVM]] reference implementation by Sun; [[OpenJDK]]: code under [[GPL]]; [[IcedTea]]: code and tools under [[GPL]]
|
|
|
|
|
|-
! [[Java Virtual Machine|JVM]]
| [[Java (programming language)|Java]], [[Jython]], [[Groovy (programming language)|Groovy]], [[JRuby]], [[C (programming language)|C]], [[C++]], [[Clojure]], [[Scala (programming language)|Scala]] and [http://www.is-research.de/info/vmlanguages/ several others]
| [http://java.sun.com/javase/ 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++
| JVMHotSpot is around 6500k lines; [[Technology Compatibility Kit|TCK]] is 80k tests and around 1000k lines
|-
! [[Icon (programming language)|Icon]]
| Icon
| 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 NovNovember 30</ref>
|-
! [[Lua (programming language)|Lua]]
| Lua
| [[Lua (programming language)|Lua]]
|
| {{yes}}
| [http://luajit.org/ LuaJIT]
| C
| 13k + 7k LuaJIT
|-
! [[MMIX]]
| MMIXAL
| [[MMIX]]AL
|
|
Line 255 ⟶ 300:
|-
! [[Mono (software)|Mono]]
| [[List of CLI languages|CLI languages]] including: [[C Sharp (programming language)|C#]], [[Visual Basic (.NET)|VB.NET]], [[IronPython]], [[IronRuby]], and others
| clone of Common Language Runtime. clone
| {{yes}}
| {{yes}}
| C#, C
| 2332k
|-
! [[Mozart Programming System|Oz]]
| [[Oz (programming language)|Oz]], [[Alice (programming language)|Alice]]
|
|
|
|
|
|-
! [[NekoVM]]
Line 277 ⟶ 314:
| C
| 46k
|-
! [[Oz (programming language)|Oz]]
| Oz, [[Alice (programming language)|Alice]]
|
|
|
|
|
|-
! [[O-code machine]]
Line 289 ⟶ 334:
| [[Pascal (programming language)|Pascal]]
| UCSD Pascal, widespread in late 70s including Apple II
|{{yes}}
|
|{{no}}
|
|assembly, Pascal
|
|
|-
! [[Parrot virtual machine|Parrot]]
| Perl ([[Perl 6#2000–present|6Perl 5]] &, [[Perl#2000–presentRaku (programming language)|5Raku]]), NQP-rx, [[Parrot intermediary language|PIR]], [[Parrot assemblerassembly language|PASM]], [[bytecode|PBC]], [[BASIC]], [[bc (programming language)|bc]], [[C99|C]], [[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
|
| {{yes}}
Line 314 ⟶ 359:
|
| {{yes}}
| {{ubl|[[Psyco]]|[[Unladen Swallow]]}}
| C
| 387k&nbsp;C, 368k&nbsp;Python, 10k&nbsp;ASM, 31k&nbsp;Psyco
Line 320 ⟶ 365:
! [[PyPy]]
| [[Python (programming language)|Python]]
| [[Self-hosting (compilers)|Self-hosting]] implementation of Python, next generation of [[Psyco]]
| {{yes}}
| {{yes}}
Line 328 ⟶ 373:
! [[Rubinius]]
| [[Ruby (programming language)|Ruby]]
| Virtual machine for another [[Ruby (programming language)|Ruby]] implementation
| {{yes}}
| {{yes}}
Line 335 ⟶ 380:
|-
! [[Silverlight]]
| [[C Sharp (programming language)|C#]], [[Visual Basic (.NET)|VB.NET]]
| A Micro-version of Microsoft [[.NET Framework]] to let applications run sandboxed inside browser
| {{yes}}
| {{yes}}
| C++
| 7MB (initiallyfirst releasedrelease)
|-
! [[ScummVM]]
Line 359 ⟶ 404:
|-
! [[Squirrel (programming language)|Squirrel]]
| [[Squirrel (programming language)|Squirrel]]
|
| {{yes}}
Line 367 ⟶ 412:
|-
! [[Smalltalk]]
| [[Smalltalk]]
|
|
Line 383 ⟶ 428:
|-
! [[Squeak]]
| [[Squeak]] [[Smalltalk]]
| [[Self-hosting (compilers)|Self hosting]] implementation of [[Squeak]] virtual machine. Rich multi-media support.
| {{yes}}
| {{yes|Cog [http://www.mirandabanda.org/cog/] & Exupery}}
| Smalltalk/[http://wiki.squeak.org/squeak/2267 Slang]
| 110k Smalltalk, ~300K C
|-
![[SWI-Prolog]]
|Prolog: [[SWI-Prolog]], [[YAP (Prolog)|YAP]]
|
| {{yes}}
| {{no}}
| C, SWI-Prolog
|
|-
! [[TraceMonkey]]
| JavaScript
| Based on [[Tamarin (JavaScript enginesoftware)|Tamarin]]
| {{no}}
| {{yes}}
Line 422 ⟶ 475:
|
|-
! [[Vx32|Vx32]] virtual machine]]
| [[x86]] binaries
| Application-level virtualization for native code
Line 438 ⟶ 491:
|
|-
! [[YARV|Yet Another Ruby VM ([[YARV)]])
| [[Ruby (programming language)|Ruby]]
| Virtual machine of the reference implementation for [[Ruby (programming language)|Ruby]] 1.9 and newer versions
Line 447 ⟶ 500:
|-
! [[Z-machine]]
| [[Z-machine|Z-Code]]
|
|
Line 464 ⟶ 517:
 
==See also==
{{div col}}
* [[Application virtualization]]
* [[Language binding]]
Line 470 ⟶ 524:
* [[Name mangling]]
* [[Application programming interface]] (API)
* [[Application Binarybinary Interfaceinterface]] (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}}
 
==External links==
*[http://lists.gnu.org/archive/html/dotgnu-libjit/2004-05/index.html "libJIT vs LLVM discussion" Rhys Weatherley (libJIT) and Chris Lattner (LLVM)]
*[http://java-virtual-machine.net/other.html List of Java Virtual Machines (JVMs), Java Development Kits (JDKs), Java Runtime Environments (JREs)]
 
[[Category:Software comparisons|application virtualization software]]