Monday 16 March 2015

Q 04) What Is Jvm Explain With a Diagram ?





Java Virtual Machine (JVM) :

     A JVM converts bytecode into machine level language.
or

    A jvm is a runtime environment used to run bytecode generated form the source code without taking the help of the operating system.



1)    Class loader : Loads the class files
2)    Class Method Area : All the methods and method data are stored.
3)    HEAP: All the OBJECTS are stored here.
4)    STACK: Java stack stores frames, it holds local variables and partial results and plays a part in method invocation and return values.
5)    PC (Program Counter )Register: Contains address of JVM instructions currently being executed.
6)    Native Method Stack : All native methods used in application.
7)    Execution Engine : 
·       A Virtual processor
·       Interpreter ( Reads bytecode streams then executed instruction )
·       JIT Complier (Just In Time)

JIT Compiler : A JIT (Just In Time) Compiler is used to improve the performance.

A JIT – Compiler compiles  parts of byte code that have similar functionality at the same time, and hence reduces the time needed.

1 comment: