JVM Architecture


jvm JVM Architecture JVM abbreviate Java virtual machine. It is a software comes along with jdk software.
Jvm architecture mainly categorized into three parts

  1. Class loader sub system
  2. Runtime memory area
  3. Execution engine
  • Class loader sub system:
  • Class loader sub system is a special program which loads the .class file into method area at time of execution.
  • Runtime memory area
  • The entire properties of java program is stored in the five memory locations

    1. Method area:
    2. In which all the properties of class will be stored except non-static variables and objects(static blocks ,static variables, static and non-static methods will be stored in the method area.
    3. Heap area:
    4. In which object will be stored (non-static variable of a class).
    5. Java Stack:
    6. In which object references ,list of executable instructions will be stored.
    7. PC register:
    8. Which contains address of the next executable instruction.
    9. Native method area:
    10. Which holds the native code (other then java code),this memory area depends on native method library.(which holds library properties of native code.
    Java native interface will access interface between native method area and native method library.
  • Execution engine:
  • This is heart of engine JVM, which mainly contains two components
    1. Interpreter
    2. JIT compiler
  • Interpreter:
  • Interpreter will convert the one by one byte code instruction into machine level instructions .but the main disadvantage is slow processing to overcome above disadvantage JIT compiler was introduced.
  • JIT Compiler(Just in time compiler):
  • It is special type of interpreter used to speed up the execution of java program. If any java program executed for the first time the interpreter comes into picture, from second time anwords JIT compiler comes into picture.