JVM Architecture

JVM Architecture-:





  1. The byte code is loaded in to JVM using class loader Subsystem.
  2. class loader Subsystem contain three components 
  • Loader
  • Linker
  • Initialazation Block             

  • Loader-
Loader will have of three type of loader
  • BootStrap Loader
  • Extension class loader 
  • Application class loader
The Byte code is transfer to Application class loader this Application class loader will transfer the byte code to extension class loader and extension class loader transfer the file to Bootstarp loader .
which is known as Deligation Herrarchy Algorithm.
  •  Bootstrap -Now Bootstrap Class Loader will check the byte code in bootstrap class loader if the Byte code is not found than Extension class loader will check Extension folder .if the byte code is not found than Application class loader will check Application folder ,if the byte code is not found .it genrate 1 Exception "No such class found".

  • Linker-
After Linking the byte code the Byte code Starts Loading While loading verify component will check the code.


if the code is correct Prepare for loding while prepration resolve the code and find what it is.


  • Initiation-
Once the code is verify initialize with initial value.If the Byte Code is correct by the class loader subsytem than the byte code is allocated with memory known as Runtime Data Area.

Runtime Data Area is Divided in to  5 blocks
  •  Method Area
  • Heap Area 
  • Java Stack Area
  • Pc Register Area
  • Native Method Area

  •  Method Area-:
Method Area is Memory Block where the class information is loaded .All the method and data Varaibles of the classes are loaded into  Method Area.

[Note-:      Void main() method is copied on to Java Stack Data to Start  the Execution this is also known as class area.]


  • Heap Area-:
The Memory block where the object is created is known as Heap Area .which is also known as Object Area.


  • Java Stack Area-:
The memory block where the method is executed is known as Java stack area.

  • Pc Register Area-:
Pc Register which Maintain the status of executing method in java stack area .How many methods are running in Java stack area that many Pc will open in Pc register Area .


  • Native Method Area-:
The memory block where Native method code is loaded is known as Native method area .

       Ex-C  or C++ code


[Note-:
Native method code will be executed using a seprate interface known as JNI.while executing JNI can intreact with Native method libraries.]


Execution Engine-:


Execution Engine contain two translator-
  •  Interpretter
  • JIT compiler

Execution engine is controlled by Interpretter because of this reason Java is known as Interpreted Language.
Normal instruction from the programe will be xecuted by the interpretter and Reapeative instruction are excuted by JIT compiler.Because of JIT compiler in execution engine Java is High Performance Language.

[Note-:
Executing more no. of instruction in less amount of time is known as High Performance.]

Reapetative block which are executed byte JIT Compiler are known as Hot Spot.The internal Component of execution engine is known as Profiler .which identifies Hot spot.The process of identifying Hot spot and executing them is known as Adaptive Optimization Technique.













































\

0 comments:

Post a Comment

Enter Here Your Ideas and Comment to improve this Blog

Popular Posts

Nilesh Jha. Powered by Blogger.

Contact Form

Name

Email *

Message *

Copyright © Nilesh Jha's Blog |
|