Explain Java Virtual Machine's Internal Architecture



  • Classloader − Loads the class file into the JVM.

  • Class Area −Storage areas for class elements structure like fields, method data, code of method etc.

  • Heap −Runtime storage allocation for objects.

  • Stack −Storage for local variables and partial results. A stack contains frames and allocates one for each thread. Once a thread get completed, this frame also gets destroyed. It also plays roles in method invocation and returns.

  • PC Registers −Program Counter Registers contains the address of instruction that JVM is currently executing.

  • Execution Engine −It has a virtual processor, interpreter to interpret bytecode instructions one by one and a JIT, just in time compiler.

  • Native method stack − It contains all the native methods used by the application.


Advertisements