JAVA VIRTUAL MACHINE(JVM)

JAVA VIRTUAL MACHINE(JVM)

A Java virtual machine is a virtual machine that enables a computer to run Java programs as well as programs written in other languages that are also compiled to Java bytecode. The JVM is detailed by a specification that formally describes what is required in a JVM implementation.

Process of JVM

This flow diagram will describe the JVM process.

No alt text provided for this image

JVM Architecture

It contains classloader, memory area, execution engine .

Classloader

Classloader is a subsystem of JVM which is used to load class files. Whenever we run the java program, it is loaded first by the classloader. There are three built-in classloaders in Java.

Class(Method) Area

Class(Method) Area stores per-class structures such as the runtime constant pool, field and method data, the code for methods.

Heap

It is the runtime data area in which objects are allocated.

Stack

Java Stack stores frames. It holds local variables and partial results, and plays a part in method invocation and return.

Program Counter Register

PC (program counter) register contains the address of the Java virtual machine instruction currently being executed.

Native Method Stack

It contains all the native methods used in the application.

Execution Engine

It contains:

  1. A virtual processor
  2. Interpreter: Read bytecode stream then execute the instructions.
  3. Just-In-Time(JIT) compiler: It is used to improve the performance. JIT compiles parts of the byte code that have similar functionality at the same time, and hence reduces the amount of time needed for compilation. Here, the term "compiler" refers to a translator from the instruction set of a Java virtual machine (JVM) to the instruction set of a specific CPU.

Java Native Interface

Java Native Interface (JNI) is a framework which provides an interface to communicate with another application written in another language like C, C++, Assembly etc. 

No alt text provided for this image

To view or add a comment, sign in

More articles by Vijay Yadav

  • How IBM using quantum computing

    How IBM using quantum computing

    What is quantum computing? Quantum computing is a rapidly-emerging technology that harnesses the laws of quantum…

  • How Kubernetes is used in Industries and what use cases solved by Kubernetes

    How Kubernetes is used in Industries and what use cases solved by Kubernetes

    Kubernetes is an open-source container-orchestration system for automating computer application deployment, scaling…

  • Industry Use case on Automation Using Ansible

    Industry Use case on Automation Using Ansible

    This session was organized by two experts from Redhat => Sreejith Anujan The Principal Instructor at Red Hat…

  • How ansible helps in solving challenges faced by big industries?

    How ansible helps in solving challenges faced by big industries?

    What is Ansible? Ansible is an open source automation platform. It is a simple automation language that can perfectly…

    2 Comments
  • Create High Availability Architecture with AWS CLI

    Create High Availability Architecture with AWS CLI

    Amazon CloudFront Amazon CloudFront is a fast content delivery network (CDN) service that securely delivers data…

  • MENU PROGRAM

    MENU PROGRAM

    Task Description : Create a Menu Using Python integrating all the concepts that have been taught by Vimal sir till now.…

    2 Comments
  • How company are benefited by artificial intelligence

    How company are benefited by artificial intelligence

    Artificial Intelligence : Artificial intelligence (AI) refers to the simulation of human intelligence in machines that…

  • WORKING WITH AWS CLI

    WORKING WITH AWS CLI

    he AWS Command Line Interface (CLI) is a unified tool to manage your AWS services. With just one tool to download and…

  • AWS case studies

    AWS case studies

    Amazon Web Services (AWS) AWS (Amazon Web Services) is a comprehensive, evolving cloud computing platform provided by…

    1 Comment
  • HOW YOUTUBE STORE DATA

    HOW YOUTUBE STORE DATA

    HISTORY OF YOUTUBE: YouTube was founded by Chad Hurley, Steve Chen, and Jawed Karim, when they worked for PayPal. Prior…

    2 Comments

Insights from the community

Others also viewed

Explore topics