The Java architecture includes four independent but related technologies:
Java programming language
Java API
Java class file format
JVM: Java Virtual Machine
JVM implementation method:
1. One-time interpreter, interpreting bytecode and executing it;
2. Instant Compiler (just-in-time complier)
Depends on the results of more memory cache interpretations
3. Adaptive Compiler
Cache around 20% code, improving the speed by about 80%;
Runtime data zone:
Private thread memory zone:
Program counters
Java Virtual Machine Stack
Thread shared memory zone:
Method Area
Heap: Java automatic memory recovery, GC (Garbage Collector)
Garbage collection algorithm:
1. Mark-clear
2. Copy
1/2
3. Mark-organize
Java configuration parameters:
-XX: + <option>: enables the function specified by this parameter;
-XX:-<option>: Disable the function.
-XX: <option >=< value>: assigns a value to the option specified by option;
-D <name >=< value>: Set a system property
Java-XX: + printflagsfinal: Display All parameters and their default values
Sun JDK monitoring and troubleshooting tools:
JPS, JVM Process status tool: displays the list of all hotspot VM processes in the specified system
Jstat, JVM statistics monitoring tool: Collects and displays running data of all aspects of the hotspot VM.
Jinfo: displays the configuration information of a running hotspot virtual machine.
Jmap: generate a memory dump snapshot of a hot spot Virtual Machine
Visualization tools:
Jconsole: Java Monitoring and Management Console
Jvisualvm: