Comparison of application virtualization software: Difference between revisions

Content deleted Content added
Line 1:
{{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 forto allowingallow application [[bytecode]] to berun 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]] (JIT). There are often several implementations of a given virtual machine, each covering a different functionalityset of footprintfunctions.
 
==Comparison of virtual machines==
The table here summarizes elements for which the virtual machine designs are intended to be efficient, not the list of capabilitiesabilities 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]]
!AOT
![[Shared library|Shared libraries]]
!Common Language [[Object Model]]
![[Dynamic typing]]
|-
! [[Android Runtime]] (ART)
Line 29:
| {{no}}
|-
! [[Common Language Runtime|CLR]] (CLR)
| [[Stack machine|stack]]
| automatic or manual
Line 62:
| {{no}}
|-
! [[Java Virtualvirtual Machinemachine]] (JVM)
| [[Stack machine|stack]]
| automatic
Line 139:
| {{yes}}
|-
! [[Erlang (programming language)|(BEAM / (Erlang VM)]]
| [[Register machine|register]]
| automatic
| {{?dunno}}
| {{yes}}
| {{yes}}
Line 151:
|}
 
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]]).
 
''[[Ahead-of-time compilation]] or ''' (AOT''') refers to the more classicalclassic techniquemethod of using an precompiler 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 [[OS X]] uses a Java Shared Archive (<ref>[http://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 171:
{| class="wikitable sortable"
|-
! [[Virtual machine]]
! [[Programming language|Languages]]
! Comments
! [[Interpreter (computing)|Interpreter]]
! [[Just-in-time compilation|JIT]]
! Implementation Languagelanguage
! [[Source lines of code|SLoC]]
|-
! [[Common Language Runtime|CLR]] (CLR)
| [[C Sharp (programming language)|C#]], [[C++/CLI]], [[F Sharp (programming language)|F#]], [[Visual Basic .NET|VB.NET]]
| bytecode is [[Common Intermediate Language|CIL]]; [https://github.com/dotnet/coreclr .NET Core Runtime on GitHub]
Line 203:
| 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 213:
! [[Forth virtual machine|Forth]]
| [[Forth (programming language)|Forth]]
| Features are simplified, usually include assembler, compiler, text-level and binary-level interpreters, sometimes editor, debugger and OS. CompilationCompiling speeds are >20 SKLOC/S and behave much like JIT.
| {{yes}}
| {{no}}
Line 220:
|-
! [[Glulx]]
| [[Glulx]], [[Z-machine|Z-code]]
|
|
Line 237:
|-
! [[Icon (programming language)|Icon]]
| Icon
| [[Icon (programming language)|Icon]]
|
|
Line 244:
|
|-
! [[Java Virtualvirtual Machinemachine|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]]
Line 261:
|-
! [[Lua (programming language)|Lua]]
| Lua
| [[Lua (programming language)|Lua]]
|
| {{yes}}
Line 269:
|-
! [[MMIX]]
| MMIXAL
| [[MMIX]]AL
|
|
Line 278:
! [[Mono (software)|Mono]]
| [[List of CLI languages|CLI languages]] including: [[C Sharp (programming language)|C#]], [[VB.NET]], [[IronPython]], [[IronRuby]], and others
| clone of Common Language Runtime. clone
| {{yes}}
| {{yes}}
Line 284:
| 2332k
|-
! [[MozartOz Programming(programming Systemlanguage)|Oz]]
| [[Oz (programming language)|Oz]], [[Alice (programming language)|Alice]]
|
|
Line 317:
|-
! [[Parrot virtual machine|Parrot]]
| Perl ([[Perl 6|6]] & [[Perl#2000–present|5]]), 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 350:
! [[Rubinius]]
| [[Ruby (programming language)|Ruby]]
| Virtual machine for another [[Ruby (programming language)|Ruby]] implementation
| {{yes}}
| {{yes}}
Line 381:
|-
! [[Squirrel (programming language)|Squirrel]]
| [[Squirrel (programming language)|Squirrel]]
|
| {{yes}}
Line 389:
|-
! [[Smalltalk]]
| [[Smalltalk]]
|
|
Line 405:
|-
! [[Squeak]]
| [[Squeak]] [[Smalltalk]]
| [[Self hosting]] implementation of [[Squeak]] virtual machine. Rich multi-media support.
| {{yes}}
| {{yes|Cog [http://www.mirandabanda.org/cog/] & Exupery}}
Line 444:
|
|-
! [[Vx32|Vx32]] virtual machine]]
| [[x86]] binaries
| Application-level virtualization for native code
Line 460:
|
|-
! [[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 469:
|-
! [[Z-machine]]
| [[Z-machine|Z-Code]]
|
|
Line 492:
* [[Name mangling]]
* [[Application programming interface]] (API)
* [[Application Binarybinary Interfaceinterface]] (ABI)
* [[Comparison of platform virtualization software]]
 
Line 500:
==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 Virtualvirtual Machinesmachines (JVMs), Java Development Kits (JDKs), Java Runtime Environments (JREs)]
 
[[Category:Software comparisons|application virtualization software]]