Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Comparison of application virtualization software

From Wikipedia, the free encyclopedia

icon
This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Comparison of application virtualization software" – news ·newspapers ·books ·scholar ·JSTOR
(October 2011) (Learn how and when to remove this message)

Application virtualization software refers to both applicationvirtual machines and software responsible for implementing them. Application virtual machines are typically used to allow applicationbytecode to run portably on many different computer architectures and operating systems. The application is usually run on the computer using aninterpreter orjust-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

[edit]
JavaScript machines not included. SeeList 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.

Virtual machineMachine modelMemory managementCode securityInterpreterJITAOTShared librariesCommon LanguageObject ModelDynamic typing
Android Runtime (ART)registerautomaticYesYesYesYes?YesYes
Common Language Runtime (CLR)stackautomatic or manualYesYesYesYesYesYesYes
Dis (Inferno)registerautomaticYesYesYesYesYesYesYes
DotGNUPortable.NETstackautomatic or manualYesYesYesYesYesYesNo
HotSpotJVMstackautomaticYesYesYesYesYesYesYes[1]
JikesRVMstackautomaticYesYesYesYes?YesYes
LLVMregistermanualNoYesYesYesYesYesNo
Monostackautomatic or manualYesYesYesYesYesYesYes
ParrotregisterautomaticNoYesNo[2]YesYesYesYes
DalvikregisterautomaticYesYesYesNo?NoNo
SqueakstackautomaticNoYesYesNoYesNoYes
BEAM (Erlang)registerautomatic?YesYesYesYesYesYes
MoarVMregisterautomatic?YesYesYesYesYesYes

Virtual machine instructions process data in local variables using a mainmodel of computation, typically that of astack machine,register machine, orrandom 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 popularJava virtual machines (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.

Aninterpreter 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 (seeAdaptive 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 libraries are a facility to reuse segments of native code across multiple running programs. In modern operating systems, this generally means usingvirtual memory to share the memory pages containing a shared library across different processes which are protected from each other viamemory 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 onOS X uses a Java Shared Archive[3] to provide some of the benefits of shared libraries.

Comparison of application virtual machine implementations

[edit]

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.

Virtual machineLanguages executedCommentsInterpreterJITImplementation languageSLoC
BEAMErlang,Elixir,Gleam,Cuneiform,LFE, Clojerl, LuerlYes[4]Yes[5]Erlang, C, C++1561k includingOTP
Common Language Runtime (CLR)C#,C++/CLI,F#,VB.NETbytecode isCIL;.NET Core Runtime on GitHubNoYesC#, C++
Adobe Flash Player (akaTamarin)ActionScript,SWF (file format)interactive web authoring tool; bytecode is namedActionScript Byte Code (.abc)YesYesC++135k (initially released)
Dis (Inferno)LimboDis Virtual Machine SpecificationYesYesC15k + 2850 per JIT arch + 500 per host OS
DotGNU-Portable.NETCLI languages including:C#Common Language Runtime cloneNoYesC, C#
ForthForthFeatures 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.YesNoForth, Forth Assembler2.8K to 5.6K; advanced, professional implementations are smaller.
GlulxInform 6, Inform 7, othersYesNoVarious implementations exist
HHVMPHP,HackIs an open-source virtual machine designed for executing programs written in Hack and PHP.YesYesC++, OCaml
HotSpotJava,Kotlin,Jython,Groovy,JRuby,C,C++,Clojure,Scala and several othersJVM reference implementation by Sun;OpenJDK: code underGPL;IcedTea: code and tools underGPLYesYesJDK,OpenJDK &IcedTea with regular JIT : Java, C, C++, ASM ;IcedTea with the "Zero" JIT : Java, C, C++HotSpot is around 6500k lines;TCK is 80k tests and around 1000k lines
IconIconBase 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.YesNoC, 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)
LLVMC,C++,Kotlin,Objective-C,Swift,Ada,Fortran, andRustMSIL, 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)".YesYesC++811k[6]
LuaLuaYesLuaJITC13k + 7k LuaJIT
MMIXMMIXAL
MonoCLI languages including:C#,VB.NET,IronPython,IronRuby, and othersCommon Language Runtime cloneYesYesC#, C2332k
NekoVMcurrentlyNeko andHaxeYesx86 onlyC46k
OzOz,Alice
O-code machineBCPL
p-code machinePascalUCSD Pascal, widespread in late 70s including Apple IIYesNoassembly, Pascal
ParrotPerl 5,Raku, NQP-rx,PIR,PASM,PBC,BASIC,bc,C99,ECMAScript,Lisp,Lua,m4,Tcl,WMLScript,XML, and othersYesYesC, Perl111k C, 240k Perl
Perl virtual machinePerlop-code tree walkerYesNoC, Perl175k C, 9k Perl
CPythonPythonYesC387k C, 368k Python, 10k ASM, 31k Psyco
PyPyPythonSelf-hosting implementation of Python, next generation ofPsycoYesYesPython
RubiniusRubyVirtual machine for another Ruby implementationYesYesC++, Ruby
SilverlightC#,VB.NETMicro-version of Microsoft.NET Framework to let applications run sandboxed inside browserYesYesC++7MB (first release)
ScummVMScummComputer game engine
SECDISWIM,Lispkit Lisp
SquirrelSquirrelYesSquirrel_JITC++12k
SmalltalkSmalltalk
SQLiteSQLite opcodesVirtual database engine
SqueakSqueakSmalltalkSelf hosting implementation of Squeak virtual machine. Rich multi-media support.YesCog & ExuperySmalltalk/Slang110k Smalltalk, ~300K C
SWI-PrologProlog:SWI-Prolog,YAPYesNoC, SWI-Prolog
TraceMonkeyJavaScriptBased onTamarinNoYesC++173k
TrueTypeTrueTypeFont rendering engineYesNoC (typically)
Valgrindx86/x86-64 binariesChecking of memory accesses and leaks underLinuxC467k[7]
VisualWorksSmalltalkNoYesC
Vx32 virtual machinex86 binariesApplication-level virtualization for native codeNoYes
WabaVirtual machine for small devices, similar toJava
Yet Another Ruby VM (YARV)RubyVirtual machine of the reference implementation forRuby 1.9 and newer versionsYesYesC
Z-machineZ-Code
Zend EnginePHPYesNoC75k

See also

[edit]

References

[edit]
  1. ^"The Java Community Process(SM) Program - JSRs: Java Specification Requests - detail JSR# 292". Jcp.org. Retrieved2013-07-04.
  2. ^"JITRewrite – Parrot". Trac.parrot.org. Retrieved2013-07-04.
  3. ^Apple docs on OS X use of Java Shared Archive
  4. ^"A closer look at the interpreter - Erlang/OTP".
  5. ^"A first look at the JIT - Erlang/OTP".
  6. ^The LLVM Compiler InfrastructureArchived 2012-07-31 at theWayback Machine, ohloh.net, 2011 November 30
  7. ^Valgrind, ohloh.net, 2011 Nov 30.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Comparison_of_application_virtualization_software&oldid=1308237679"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp