JAVA VIRTUAL MACHINE IN OPERATING SYSTEM


JAVA VIRTUAL MACHINE:

A Java virtual machine (JVM), interprets compiled Java binary code (called bytecode) for a computer's processor (or "hardware platform") so that it can perform a Java program's instructions.

JVM consists of 

1.Class loader
2. Class verifier
3. Java interpreter

diagram:

 

  • The Class loader loads .class files from both the java program and the Java API for execution by the Java interpreter.
  • After the class is loaded ,the verifier checks,that the class file is valid Java byte code and does not overflow or underflow the stack.
  • After passing the verification,it is run by the Java Interpreter.
  • JVM also manages memory by performing garbage collection
  • Java interpreter may be a software module that interprets the byte codes one at a time,
  • or it may be (JIT)just-in-time compiler that turns the architecture neutral byte codes into native language for the host computer.
  • JVM makes possible to develop programs that are architecture neutral and portable.
  • JVM design provides a secure,efficient,object-oriented,portable and architecture-neutral platform on which to run Java programs




No comments:

Post a Comment