Misplaced Pages

Common Language Runtime

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
#731268

42-554: The Common Language Runtime ( CLR ), the virtual machine component of Microsoft .NET Framework , manages the execution of .NET programs. Just-in-time compilation converts the managed code (compiled intermediate language code) into machine instructions which are then executed on the CPU of the computer. The CLR provides additional services including memory management , type safety , exception handling , garbage collection , security and thread management . All programs written for

84-468: A high-level programming language (compared to the low-level ISA abstraction of the system VM). Process VMs are implemented using an interpreter ; performance comparable to compiled programming languages can be achieved by the use of just-in-time compilation . This type of VM has become popular with the Java programming language , which is implemented using the Java virtual machine . Other examples include

126-478: A nested guest virtual machine does not need to be homogeneous with its host virtual machine; for example, application virtualization can be deployed within a virtual machine created by using hardware virtualization . Nested virtualization becomes more necessary as widespread operating systems gain built-in hypervisor functionality, which in a virtualized environment can be used only if the surrounding hypervisor supports nested virtualization; for example, Windows 7

168-431: A normal application inside a host OS and supports a single process. It is created when that process is started and destroyed when it exits. Its purpose is to provide a platform -independent programming environment that abstracts away details of the underlying hardware or operating system and allows a program to execute in the same way on any platform. A process VM provides a high-level abstraction – that of

210-631: A particular architecture does not provide hardware support required for nested virtualization, various software techniques are employed to enable it. Over time, more architectures gain required hardware support; for example, since the Haswell microarchitecture (announced in 2013), Intel started to include VMCS shadowing as a technology that accelerates nested virtualization. Kernel same-page merging In computing , kernel same-page merging ( KSM ), also known as kernel shared memory , memory merging , memory deduplication , and page deduplication

252-673: 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 ,

294-451: A specific programming language, but are embedded in an existing language; typically such a system provides bindings for several languages (e.g., C and Fortran ). Examples are Parallel Virtual Machine (PVM) and Message Passing Interface (MPI). 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

336-607: A system virtual machine can be considered a generalization of the concept of virtual memory that historically preceded it. IBM's CP/CMS , the first systems to allow full virtualization , implemented time sharing by providing each user with a single-user operating system, the Conversational Monitor System (CMS). Unlike virtual memory, a system virtual machine entitled the user to write privileged instructions in their code. This approach had certain advantages, such as adding input/output devices not allowed by

378-440: Is a kernel feature that makes it possible for a hypervisor system to share memory pages that have identical contents between multiple processes or virtualized guests. While not directly linked, Kernel-based Virtual Machine (KVM) can use KSM to merge memory pages occupied by virtual machines . KSM performs memory deduplication by scanning through main memory for physical pages that have identical content, and identifies

420-493: Is also used to implement the "guest" environments, and applications running in a given "guest" environment view it as a stand-alone system. The pioneer implementation was FreeBSD jails ; other examples include Docker , Solaris Containers , OpenVZ , Linux-VServer , LXC , AIX Workload Partitions , Parallels Virtuozzo Containers, and iCore Virtual Accounts. A snapshot is a state of a virtual machine, and generally its storage devices, at an exact point in time. A snapshot enables

462-463: Is an example of such snapshots. Restoring a snapshot consists of discarding or disregarding all overlay layers that are added after that snapshot, and directing all new changes to a new overlay. The snapshots described above can be moved to another host machine with its own hypervisor; when the VM is temporarily stopped, snapshotted, moved, and then resumed on the new host, this is known as migration. If

SECTION 10

#1732773319732

504-457: Is at a premium. KSM was merged into the Linux kernel mainline in version 2.6.32, which was released on December 3, 2009. To be effective, the operating system kernel must find identical memory pages held by different processes. The kernel also needs to predict whether the pages are likely to update infrequently enough that the merging would be an efficient use of processor resources. A concern

546-548: Is capable of running Windows XP applications inside a built-in virtual machine. Furthermore, moving already existing virtualized environments into a cloud, following the Infrastructure as a Service (IaaS) approach, is much more complicated if the destination IaaS platform does not support nested virtualization. The way nested virtualization can be implemented on a particular computer architecture depends on supported hardware-assisted virtualization capabilities. If

588-723: 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

630-582: 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

672-554: 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

714-547: The Parrot virtual machine and the .NET Framework , which runs on a VM called the Common Language Runtime . All of them can serve as an abstraction layer for any computer language. A special case of process VMs are systems that abstract over the communication mechanisms of a (potentially heterogeneous) computer cluster . Such a VM does not consist of a single process, but one process per physical machine in

756-592: 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

798-402: The 'host', and the virtual machine emulated on that machine is generally referred to as the 'guest'. A host can emulate several guests, each of which can emulate different operating systems and hardware platforms. The desire to run multiple operating systems was the initial motive for virtual machines, so as to allow time-sharing among several single-tasking operating systems. In some respects,

840-711: The .NET Framework, regardless of programming language , are executed in the CLR. All versions of the .NET Framework include CLR. The CLR team was started June 13, 1998. CLR implements the Virtual Execution System (VES) as defined in the Common Language Infrastructure (CLI) standard, initially developed by Microsoft itself. A public standard defines the Common Language Infrastructure specification. During

882-643: The IBM CP-40 and CP-67 , predecessors of the VM family. Examples outside the mainframe field include Parallels Workstation , Parallels Desktop for Mac , VirtualBox , Virtual Iron , Oracle VM , Virtual PC , Virtual Server , Hyper-V , VMware Fusion , VMware Workstation , VMware Server (discontinued, formerly called GSX Server), VMware ESXi , QEMU , Adeos , Mac-on-Linux, Win4BSD, Win4Lin Pro , and Egenera vBlade technology. In hardware-assisted virtualization,

SECTION 20

#1732773319732

924-445: The VM continues operation from the last-known coherent state, rather than the current state, based on whatever materials the backup server was last provided with. Nested virtualization refers to the ability of running a virtual machine within another, having this general concept extendable to an arbitrary depth. In other words, nested virtualization refers to running one or more hypervisors inside another hypervisor. The nature of

966-457: The VM for a location on its physical disk are transparently translated into an operation on the corresponding file. Once such a translation layer is present, however, it is possible to intercept the operations and send them to different files, depending on various criteria. Every time a snapshot is taken, a new file is created, and used as an overlay for its predecessors. New data is written to the topmost overlay; reading existing data, however, needs

1008-449: The cluster. They are designed to ease the task of programming concurrent applications by letting the programmer focus on algorithms rather than the communication mechanisms provided by the interconnect and the OS. They do not hide the fact that communication takes place, and as such do not attempt to present the cluster as a single machine. Unlike other process VMs, these systems do not provide

1050-411: The developmental stage, so it runs inside a sandbox . Virtual machines have other advantages for operating system development and may include improved debugging access and faster reboots. Multiple VMs running their own guest operating system are frequently engaged for server consolidation. A process VM, sometimes called an application virtual machine , or Managed Runtime Environment (MRE), runs as

1092-525: The functionality of a physical computer. Their implementations may involve specialized hardware, software, or a combination of the two. Virtual machines differ and are organized by their function, shown here: Some virtual machine emulators, such as QEMU and video game console emulators , are designed to also emulate (or "virtually imitate") different system architectures, thus allowing execution of software applications and operating systems written for another CPU or architecture. OS-level virtualization allows

1134-931: The hardware provides architectural support that facilitates building a virtual machine monitor and allows guest OSes to be run in isolation. Hardware-assisted virtualization was first introduced on the IBM System/370 in 1972, for use with VM/370 , the first virtual machine operating system offered by IBM as an official product. In 2005 and 2006, Intel and AMD provided additional hardware to support virtualization. Sun Microsystems (now Oracle Corporation ) added similar features in their UltraSPARC T-Series processors in 2005. Examples of virtualization platforms adapted to such hardware include KVM , VMware Workstation , VMware Fusion , Hyper-V , Windows Virtual PC , Xen , Parallels Desktop for Mac , Oracle VM Server for SPARC , VirtualBox and Parallels Workstation . In 2006, first-generation 32- and 64-bit x86 hardware support

1176-416: The older snapshots are kept in sync regularly, this operation can be quite fast, and allow the VM to provide uninterrupted service while its prior physical host is, for example, taken down for physical maintenance. Similar to the migration mechanism described above, failover allows the VM to continue operations if the host fails. Generally it occurs if the migration has stopped working. However, in this case,

1218-486: The overlay hierarchy to be scanned, resulting in accessing the most recent version. Thus, the entire stack of snapshots is virtually a single coherent disk; in that sense, creating snapshots works similarly to the incremental backup technique. Other components of a virtual machine can also be included in a snapshot, such as the contents of its random-access memory (RAM), BIOS settings, or its configuration settings. " Save state " feature in video game console emulators

1260-421: The resources of a computer to be partitioned via the kernel . The terms are not universally interchangeable. A "virtual machine" was originally defined by Popek and Goldberg as "an efficient, isolated duplicate of a real computer machine." Current use includes virtual machines that have no direct correspondence to any real hardware. The physical, "real-world" hardware running the VM is generally referred to as

1302-440: The same computer (e.g., Windows , Linux , or prior versions of an operating system) to support future software. The use of virtual machines to support separate guest operating systems is popular in regard to embedded systems . A typical use would be to run a real-time operating system simultaneously with a preferred complex operating system, such as Linux or Windows. Another use would be for novel and unproven software still in

Common Language Runtime - Misplaced Pages Continue

1344-453: The same physical page by a technique termed kernel same-page merging (KSM). This is especially useful for read-only pages, such as those holding code segments, which is the case for multiple virtual machines running the same or similar software, software libraries, web servers, middleware components, etc. The guest operating systems do not need to be compliant with the host hardware, thus making it possible to run different operating systems on

1386-415: The standard system. As technology evolves virtual memory for purposes of virtualization, new systems of memory overcommitment may be applied to manage memory sharing among multiple virtual machines on one computer operating system. It may be possible to share memory pages that have identical contents among multiple virtual machines that run on the same physical machine, what may result in mapping them to

1428-416: The transition from legacy .NET technologies like the .NET Framework and its proprietary runtime to the community-developed .NET Core , the CLR was dubbed CoreCLR . Today, it is simply called the .NET runtime . Virtual machine In computing , a virtual machine ( VM ) is the virtualization or emulation of a computer system . Virtual machines are based on computer architectures and provide

1470-520: 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. In full virtualization, the virtual machine simulates enough hardware to allow an unmodified "guest" OS (one designed for the same instruction set ) to be run in isolation. This approach was pioneered in 1966 with

1512-429: The virtual machine's state at the time of the snapshot to be restored later, effectively undoing any changes that occurred afterwards. This capability is useful as a backup technique, for example, prior to performing a risky operation. Virtual machines frequently use virtual disks for their storage; in a very simple example, a 10- gigabyte hard disk drive is simulated with a 10-gigabyte flat file . Any requests by

1554-660: 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

1596-432: The virtual pages that are mapped to those physical pages. It leaves one page unchanged, and re-maps each duplicate page to point to the same physical page, after which it releases the extra physical pages for re-use. It also marks both virtual pages as " copy-on-write " (COW), so that kernel will automatically remap a virtual page back to having its own separate physical page as soon as any process begins to write to it. KSM

1638-427: Was found to rarely offer performance advantages over software virtualization. In OS-level virtualization, a physical server is virtualized at the operating system level, enabling multiple isolated and secure virtualized servers to run on a single physical server. The "guest" operating system environments share the same running instance of the operating system as the host system. Thus, the same operating system kernel

1680-431: Was originally intended to run more virtual machines on one host by sharing memory between processes as well as virtual machines. An experimental implementation of KSM by Red Hat found that 52 virtual instances of Windows XP with 1 GB of memory, could run on a host computer that had only 16 GB of RAM. Upon its implementation , users found KSM to also be useful for non-virtualized environments in which memory

1722-479: 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

Common Language Runtime - Misplaced Pages Continue

1764-548: 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

#731268