• JVM - Java Virtual Memory

    Java Virtual Memory(JVM)

    JVM also called Java Virtual Machine is an abstract machine. It is specification that provides runtime environment in which java byte code can be executed.

    Characteristics:

    1. JVM is a specification where working of J.V.M is specified but implementation provider is independent to choose the algorithm.
    2. J.V.M is an implementation; it’s implementation is known as JRE.
    3. Run time instance: Whenever we write a java command to run the java class an instance of J.V.M is created.

    Operation of J.V.M:

    1. Loading code.
    2. Verifying codes.
    3. Executing codes.
    4. Providing run time Environment.

    Architecture of J.V.M:


    1. Class Loader:

     It is a subsystem of JVM which is use to load class files. Whenever we run the java program it is loaded first by the class loader. There are 3 built in class loaders in JVM –
    a. Boot strap class loader.
    b. Execution class loader.
    c. System/ Application class loader.

    2. Class area: 

    Class (Method) area stores per class structures such as method data, code for Methods.

    3. Heap: 

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

    4.Stack:

     JVM stack holds local variables and partial results and plays a part in partial results and plays a part in method invocation and return. Each thread has a private JVM stack created as the same time as thread.

    5.Program counter register: 

    It contains the address of JVM instruction that will be executed to be next.

    6. Native Method Stack: 

    It contains all native methods used in the application.

    7. Execution Engine: 

    It is composed of a virtual processor, an interpreted, a just in time (JIT) compiler

    8.Java native interface:

     It provides an interface to communicate with another application in another language. Like C, C++ etc.
  • You might also like

    No comments:

    Post a Comment

search topics

NEWSLETTER

Get All The Latest Updates Delivered Straight Into Your Inbox For Free!