skip to main | skip to sidebar

Java Programs and Examples with Output

Pages

▼
 
  • RSS
  • Twitter
Tuesday, October 2, 2012

JVM ( JAVA VIRTUAL MACHINE)

Posted by Admin at 5:28 AM – 0 comments
 
---responsible for taking .class file and converting each byte code instruction into Machine language instruction that can be executed by microprocessor.
---.java program is converted into .class file consisting
 of byte code instructions by java Compiler.
---Classloader Subsystem performs:
first loads all .class files into memory.
Then verifies whether all byte code instructions are proper or not if it finds any instruction is not proper the execution is rejected.
If byte Code instructions are proper than it allocated memory for program.
---The memory is divided into 5 parts called runtime data areas
  • Method Area
  • heap
  • java Stacks
  • Pc registers
  • Native methods
--Method area: which stores code of variables,code of methods in java program.
--Heap: This is the area where Objects are created.whenever JVM loads a class, a method and a heap area immediately for it.
--JAVA Stacks: are used to Store data for method area.but while running a method it needs a Storage to store data and results for this is used.
Stacks are memory areas where Java Methods are executed.
--PC registers: contains memory addresses of instructions of methods.
if they are 3methods then 3 PC registers are used to track instruction of the methods.
Native Methods:
--native methods(C/C++ functions) are executed on native methods stacks.
--The header files are located and Connnected in JVM by program called NATIVE PROGRAM INTERFACE.....................

Execution engine & interpreted are responsible for byteCode instructions into machine Code that the Processor will execute them.
JIT part of compiler increases execution Speed.

Leave a Reply

Newer Post Older Post
Subscribe to: Post Comments ( Atom )
  • Popular
  • Recent
  • Archives
Powered by Blogger.
 
 
 
© 2011 Java Programs and Examples with Output | Designs by Web2feel & Fab Themes

Bloggerized by DheTemplate.com - Main Blogger