The first chapter history 1.Java virtual machine development

Outline

Most of our Java developers are more familiar with the Java virtual machine is HotSpot, in fact, there are many excellent Java virtual machine, such as: BEA's JRockit and IBM J9 and so on. In this paper to review the historical changes of the Java virtual machine.

Sun Classic/Exact VM

It has a very cattle title: the world's first commercial Java Virtual Machine.

It can be used pure interpreter ways to execute Java code, if you want to use the JIT compiler, it must be plug-in, but if you plug the JIT compiler, JIT compiler is completely taken over the implementation of the system of the virtual machine, the interpreter does not change work again.

As the interpreter and compiler can not work together, which means that if you want to perform using the compiler, the compiler would have to every method, every line of code is compiled, and the frequency of their execution regardless of whether the compiled value. Based program responds to the pressure of time, did not dare to use these compiler compiler optimization techniques slightly time-consuming, so this stage of the virtual machine even if the JIT compiler output native code execution efficiency and the traditional C / C ++ program has a very big gap, "Java language is very slow" image is at this time to start in the minds of users erected.

Sun team in the JDK1.2 hair on a Solaris platform Exact VM virtual machine, its execution system already has a prototype of modern high-performance virtual machine: such as two-time compiler, compiler and interpreter mixed mode of operation Wait. Exact VM because it uses the exact type of memory management (Exact Memory Management, also known as Non-Conservative / Accurate Memory Management) is named, that the virtual machine can know the data memory in a location specifically what type.

Although Exact VM technology with respect to the Classic VM is advanced a lot, but there is only referenced in the business for a very short period of time to be replaced by more good HotSpot VM, and not even to the next release of Windows and Linux platforms the commercial version. But the Classic VM before JDK1.2 Sun JDK is the only virtual machine, when JDK1.2, it co-exist with the HotSpot VM, but the default is to use CLassic VM, and JDK1.3 when the HotSpot VM as the default virtual machine , but the Classic VM is still as "standby select the" virtual machine released until JKD1.4, Classic VM was completely exit the stage of history of commercial virtual machine, and Exact VM entered together into the Sun Labs Research VM.

Sun HotSpot VM

It is the Sun JDK, and OpenJDK brought in a virtual machine, is currently the most widely used Java Virtual Machine. It is by a company called "Longview Technologies" designed for small companies, even the virtual machine was not originally developed for the Java language, which comes from Strongtalk VM, but this virtual machine quite a bit of technology is a source of Self language models support "to achieve the C language more than 50% efficiency," the goal of the design of the virtual machine. Sun has taken note of this virtual machine has a lot of good ideas and practical effect on the JIT compiler, Longview Technologies acquired the company in 1997 to obtain the HotSpot VM.

HotSpot VM hotspot detection capabilities can identify the code that the code has compiled the most value by performing a counter, and then notify the JIT compiler to compile the method as a unit, if a method is called frequently or effective method many cycles, respectively, will be punished standard compiler and the OSR (replacement on the stack) compiler operation. By a compiler and interpreter to work properly, the optimal time can be performed to balance performance optimization program responds, but without waiting for the output of the local code to perform the program, time compilation time pressure is relatively reduced, so that there facilitate the introduction of more code optimization techniques, higher quality of output native code.

In 2008 and 2009, Oracle and BEA companies were acquired Sun, so that Oracle would also have the two best Java Virtual Machine: JRockit VM and the HotSpot VM. After Oralce will be on the basis of HotSpot, JRockit outstanding characteristics of migration, such as the use JRockit garbage collector and MissionControl services run using the HotSpot JIT compiler and a mixed system.

Sun Mobile-Embedded VM/Meta-Circular VM

Sun's mobile and embedded in the face of long, also released a virtual machine, in addition to a class of virtual machines, beginning in the design does not have a commercial purpose, just for research, and to verify certain technical point of view, or as some of the standards implementation.

Other Sun's Java Virtual Machine release are:

KVM

The KVM K is "Kilobyte" meaning, which emphasizes simple, cool, highly portable, but run more slowly. It has been very widely used in mobile phone platform in front of Android, IOS and other smart phone operating system appears.

CDC/CLDC HotSpot Implementation

CDC / CLDC is full Connected (Limited) Device Configuration, is defined in the JSR-139 / JSR-218 specification, it is desirable to establish a uniform Java programming interfaces on a mobile phone, e-books, PDA and other equipment, and the CDC-HI VM CLDC-HI VM set is a reference implementation thereof. CDC / CLDC is an important pillar of the whole Java ME, but the current Android and IOS half the world's mobile digital device market appears, in this area, Sun's virtual machine facing a situation far less optimistic about the server and the desktop.

Squawk VM

Squawk VM was developed by Sun Microsystems, which runs on Sun SPOT (Sun Small Programmable Object Technology, a handheld WiFi devices), it has also been used in Java Card. This is a Java code high proportion of embedded virtual machine implementations, such as which class loader, bytecode verifier, garbage collector, interpreter, compiler, and the Java language itself thread scheduling are done, just by C writing device I / O and the necessary native code language.

Jvitrrjv

A laboratory nature of the virtual machine, it tries to Java language implementation of the Java language itself runtime environment, you must run the virtual machine to another host in the paper, there is no internal JIT compiler, the code it had executed the child to explain the mode.

Maxine VM

And JavaInJava similar, it is an almost entirely in Java code implementation of the Java virtual machine cycle yuan. It has advanced JIT compiler and the garbage collector (without interpreter), can be executed in host mode or in standalone mode, its efficiency is close to the level of HotSpot Client VM.

BEA JRockit / IBM J9 VM

BEA JRockit is known as "the world's fastest Java Virtual Machine" (seemingly J9 VM also said so), it focuses on server-side application, he can not quite focus on program startup speed, because the interpreter does not contain internal JRockit achieved, all code is executed by the post-time compiler compiler. In addition, to achieve some of the JRockit garbage collector and MissonControl service kits, many Java virtual machine has been in the lead.

J9 VM virtual machine was originally developed by IBM Ottawa Lab called SmallTalk extension comes. JRockit and focus on different server, J9's market position in the HotSpot closer. Its main market is and IBM products (such as WebSphere) with and deploy Java applications on IBM AIX and z / OS these platforms.

Azul VM / BEA Liquid VM

They are a particular hardware platform-specific virtual machine.

Azul Systems Azul VM is a lot of improvement in the company HotSpot based on the Java virtual machine to run on Azul Systems, Inc. proprietary hardware Vwga system, each Azul VM instance can manage at least dozens of hundreds of GB of memory and CPU hardware resources and provides for controlled in a huge range of memory garbage collector GC time is optimized proprietary hardware thread scheduling and other outstanding features. In 2010, it released the Zing JVM, can provide properties close to the Vega system on a common x86 platform.

Liquid VM that is now JRockit VE (Virtual Edition), which is developed by BEA, can run a virtualized version of JRockit VM Hypervisor system on their own, do not need to support Liquid VM operating system, or it from basic the realization of the essential functions of a proprietary operating system, such as file systems, network support. General crossed by the virtual machine operating system direct control of hardware or may have many benefits, such as thread scheduling, no further kernel mode / user mode switching or the like, which can maximize the capabilities of the hardware, to enhance the Java program to be executed performance.

Micorsoft JVM

Microsoft was once a die-hard supporter of Java technology (must admit, with Sun to seize control of Java, so Java cross-platform technology from the technology becomes binding on Microsoft Windows is the primary purpose of). In the Java language early birth (1996 to 1998, with release of the JDK1.2 for the sector), one of its main application is to run Java Applets program in the browser, Microsoft to support Java Applets and applications developed in IE3 own Java virtual machine, virtual machine, although this is only version of the Windows platform, Windows really was the best performance of the Java virtual machine, in October 1997, Sun has formally trademark infringement, unfair competition and other charges sued Microsoft, among the then-monopoly investigation of Microsoft, this virtual machine have been presented to the court as evidence. The results of this lawsuit is Microsoft to pay $ 20 million to Sun Microsystems (final compensation to software companies due to the monopoly of Sun's total amount of up to US $ 1 billion), if the commitment is terminated development of its Java virtual machine, and the gradual shift in the product in addition to the relevant features of the Java virtual machine. Ironically, the last time Windows XP SP3 to the Java virtual machine is completely erased, Sun has yet to export the newspaper hope Microsoft do not. Windows XP, senior product manager, said: "We spent three years and Sun lawsuit, when they tried to stop our support for Java in Windows, now we do this, can they complain, it's too ironic a. "

Quote: Zhou Zhiming of "in-depth understanding of the Java Virtual Machine: JVM advanced features and best practices", Second Edition

Guess you like

Origin www.cnblogs.com/wuqinglong/p/11099159.html