What is a virtual machine and what is a Java virtual machine
Virtual machines
Definition: Software that simulates a computer architecture and executes a specific set of instructions
System VMS (virtual Box, VMware), Process virtual machines
Process Virtual Machine
JVM, Adobe Flashplayer, FC simulator
Advanced Language Virtual Machines
JVM,. NET CLR, P-code
Java language virtual machine
You can execute a high-level language virtual machine in the Java language. Java language virtual machines are not necessarily called JVMs, for example: Apache Harmony
JAVATM virtual Machines
A Java language virtual machine that must pass the Java TCK (Technology compatibility Kit) compatibility test to be called a "JAVATM virtual machine"
JAVATM virtual machines are not necessarily executing "java" programs
The industry's three commercial jvm:oracle hotspots, Oracle Jrockit VMS, IBM J9 VMS
Oracle hotspot Virtual Machine
Originally developed by a small company called "Longview Technologies", it was acquired by Sun. Initially not for Java language development, but for Strongtalk languages.
Hotspot name comes from its "hotspot code probing" technology
Joined the Sun (Oracle) JDK from JDK1.2 and became the default implementation of the Sun (Oracle) JDK at JDK1.3, becoming the only virtual machine in 1.4
Started open source at the end of 2006, and the OPENJDK project was established
Shared design, private implementation
The memory areas covered in this course are the conceptual models defined in the Java Virtual Machine specification (JVMS), but JVMS also declares that these concepts do not constrain the implementation of virtual machines, but that the effects of virtual machine implementations appear to be consistent with specification descriptions externally.
Java Runtime Data area
In the Java Virtual Machine specification, you define the areas in which different model data is stored during the run of the program.
Some zones are shared globally, and are created as virtual machines are started and destroyed as virtual machines exit. Some areas are thread-private and are created and destroyed as threads start and end.
is a common memory area conceptual model for all Java virtual machines
Partitioning of the run-time data area
Program counter (Counter Register)
A smaller memory space, which can be used as the line number indicator of the byte code executed by the current thread
If the thread is executing a Java method, this counter records the address of the executing virtual machine bytecode instruction, or null if the native method is being executed.
This memory area is the only area in the Java Virtual Machine specification that does not stipulate any outofmemoryerror conditions
Java Virtual machine and Java Memory areas overview