Two architectural models of Hotspot virtual machine

There are many kinds of java virtual machines on the market, which are divided into two architecture features: stack and register.

1. Based on the characteristics of the stack architecture (most of the common Java virtual machines on the market architecture methods)

  • Simpler design and implementation
  • No need to consider the issue of register allocation (use zero address instruction method to allocate)
  • Smaller instruction set, easy to compile
  • No need for hardware support, better portability, easier to achieve cross-platform

2. Features of register-based architecture (Android's virtual machine is a register-based approach)

  • A typical application is the x86 binary instruction set
  • Excellent performance, more efficient execution of instructions
  • Take fewer instructions to complete an operation
  • The instruction set architecture is completely dependent on hardware and has poor portability
  • The instruction set based on the register architecture is often based on one-address instructions, two-address instructions and three-address instructions, and the stack-based architecture is based on zero-address instructions.

 

 

Guess you like

Origin blog.csdn.net/qq_41813208/article/details/104526913
Recommended