In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article will explain in detail what the purpose and principle of the JVM architecture is. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have some understanding of the relevant knowledge after reading this article.
The JVM architecture consists of five parts, namely, register, stack, waste collection heap, storage area and instruction set. These five parts are the logical components of the Java virtual machine and do not depend on any implementation technology or organization, but their functions must be implemented in a certain way on the real machine.
The purpose and principle of JVM Architecture
Java is designed to be used in the interconnection network which is widely used and influenced day by day. This is a heterogeneous platform environment, there may be a variety of models, such as Intel's x86 series, Apple/IBM/Motorola 's PowerPC and so on. Each model has its own specific central processing unit (CPU) chip, and the processing process of each chip is different. Therefore, general-purpose software usually needs to write a special version for each type of machine to ensure that it runs correctly. In order to overcome this difficulty and realize the versatility and portability of the language, the designer of Java chooses a machine as the target machine for compilation, and then interprets and executes the compilation results on other models. But the selected target is not any of the above utility models, but a hypothetical processor platform called the Java virtual machine JVM (JavaVirtualMachine).
So, what is the Java virtual machine?
We can define it as the implementation of a computer that runs compiled Java object code (that is, .class class files). The JVM architecture is actually a hypothetical computer based on the actual processor. This imaginary machine can be realized by software simulation or hardware. In view of the fact that most Java virtual machines are implemented by software methods, most of the content we introduce here is also based on software implementation.
The bytecode generated by the Java compiler is composed of JVM instructions, while JVM is fictitious and is not close to any practical model, so on the one hand, the compilation result is platform neutral, and the interpreters of different models can convert the bytecode file into the appropriate machine code of the native CPU chip to execute. For the JVM level, the operating system and hardware layer are transparent, user-written Java programs can be run on any platform without modification. On the other hand, the bytecode generated by the compilation is close to the source code (nativecode) and can be interpreted and run at a higher speed on any hardware platform to achieve higher efficiency. In this way, Java tries to achieve the balance and coordination between portability and efficiency, which are two contradictory important features of distributed system through virtual machine JVM.
Next, we take a closer look at the JVM architecture, including the instruction set of JVM, the syntax of opcodes and operands, and the range of values.
So much for sharing about the purpose and principle of JVM architecture. I hope the above content can be of some help and learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.