JVM memory macro cognitive structure &&

JVM macro cognition

1. What is a virtual machine?

Virtual machine is a software .

The system can be divided into a virtual machine (physical machine simulation) and a virtual machine program (execute single computer program, such as the JVM).


2. What is a Java Virtual Machine (JVM)?

JVM is a bytecode into machine code software. (Ibid)

After iteration time, the widely used Java Virtual Machine Oracle's HotSpot VM.


3.JVM what's the use?

  • Theory: a better understanding and knowledge of the mechanisms underlying Java runtime
  • Practice: Custom performance stronger JVM (parameter tuning), because the online troubleshooting problems caused by the Java application itself (tuning mainly tone stack)

JDK releases look

  • 1991.4: Java language formerly Oak birth


  • 1995.5: Oak was renamed Java language


  • 1996.1: JDK1.0 release, on behalf of technologies, including JVM, Applet, AWT
    • Applet is a Java program that needs to be embedded in the HTML interpretation execution
    • AWT is the earlier Abstract Window Toolkit, there are popular Swing, JavaFx


  • 1997.2: JDK1.1 release technology on behalf of the JAR file format, JDBC, inner classes, reflecting


  • 2002.2: JDK1.4 release, the new technology has regular expressions, NIO, logging class
    • A regular expression is a logical format string operations
    • NIO increased buffer based on IO on a non-blocking IO model


  • 2004.9: JDK1.5 release, new technologies have automatic packing, generics, annotations, enumeration, foreach loop


  • 2006.11: Sun announced that it will open source Java, OpenJDK and the establishment of the organization of the source code management.


  • 2009.4: Oracle for $ 7.4 billion acquisition of Sun Microsystems.


  • 2014.3: Oracle released JDK1.8, the new features are Lambda expressions, Stream API


  • 2017.9: JDK9 release, new features are modular systems, interactive REPL tools, JIT, JVMCI etc.


  • 2018.3: JDK10 release, new features include type inference JEP286 local variables, JEP317 to the introduction of Full GC G1


  • 2018.9: JDK11 release, new features include a nested-based access control, JavaFx [JDK1.8 have been removed]


  • 2019.3: JDK12 release, new features have low GC pause time, micro-benchmark suite, Switch expressions.


......



JVM memory structure

JVM memory structures, also known as "run-time data area."


Thread the public:

  • Java heap: Java instance object storage, life cycle and the same JVM
  • Methods District: class information storage has been loaded in the virtual machine, final modification of the constants, static modification of static variables.
  • Runtime constant pool: the region is part of the method, a reference symbol storage literals.
    • Literal will be appreciated that the actual value, int a = 88 and the String a hello = "hello" in all literals
    • It is a reference symbol string corresponds to a unique class, method or field.

Thread-private:

  • Program Counter: each thread has a program counter, is a pointer (instruction code to be executed next) area method directed to a method bytecode, the next instruction read from the execution engine
  • VM stack: Describe the process of execution of the Java method is how memory changes.
    • Each method will perform a press-fitted into a stack element, which is called "stack frame" for storing local variable table , and out of stack information and a method for export and the like.
    • Life cycle and the same thread, the thread end automatically release the memory, no garbage collection.
  • Native method stacks: Use the virtual machine to Native method service. Native bottom is written in C, and for operating system interaction.

Guess you like

Origin www.cnblogs.com/noneplus/p/11440694.html