In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you what is the relationship between the birth of JVM and the operating system, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
1. Operating system
We all know that the operating system (Windows/Linux) is software, which is used to manage the hardware so that the hardware can run normally and rationally. of course, the drivers of all kinds of hardware implement the interface of the operating system, and the operating system can manage the hardware by calling these interfaces. The operating system also provides a layer of interface called the system call layer, which the programmer can program to realize the control of the computer. Different operating systems (or different CPU architectures) provide different interfaces, Windows and Linux provide that must be completely different, although from the final point of view can achieve a certain function. So the same program cannot be run on different systems, and it may not even run perfectly on different versions of the same system, such as the Ccontroller + program.
2.JVM
The JVM virtual machine is equivalent to a virtual computer built on top of the operating system. The memory structure can be seen that the pc register, stack, stack, metaspace and constant pool in jvm correspond to the processor and memory of the computer. Jvm+java solves the cross-platform problem, in view of how different operating systems java programs can be written at once, run everywhere, and want to achieve cross-platform, so JVM was born. JVM is associated with all operating systems downwards, and he can operate all operating systems and provide a unified interface, that is, JavaAPI, developers only need to program for JVM (JavaAPI), and developers don't care how JVM deals with different operating systems. The figure above well explains that the java virtual machine first compiles the java code into jvm's own bytecode. During the execution of jvm, the bytecode will be interpreted into the binary code processed by the machine. Jvm can complete the memory call by calling the operating system's instruction set and cup to realize the relevant instruction operation.
3. Shell
As we all know, the shell,Linux operating system manages the hardware, Linux provides a unified interface, and the shell command operates these instructions. We can see that the shell programming of Linux is equal to the jvm instructions compiled by JVM above. While the Shell command calls the middle layer, the middle call layer will explain the input commands to the operating system interface to manage and call all kinds of hardware, which we vividly call "shell", which is the same as the facade mode in the design pattern, so that what the user can control is safe and stable, and the risky operations are all behind the facade, ensuring the relative security of the operating system.
4. Operating system and CPU, instruction set relationship
CUP belongs to the hardware part, the operating system is software, and the operating system issues instructions. First of all, the operating system or ordinary applications will eventually have to be converted to binary code before they can be processed by cpu. Ordinary applications written in high-level languages must be compiled by the compiler into binary code (instructions) before they can run. Different cpu implements different instruction sets, so different instruction sets correspond to different compilers, different compilers, and the same high-level language programs get different binary codes after compilation. This leads to the concepts of "transplant" and "cross-platform", and what jvm does conveniently here is quite excellent.
5. Memory operation
In fact, we operate on the memory model (or the data structure of memory). Memory first establishes the memory model of the operating system, and then other memory models are based on or related to the memory model of the operating system. For example, the memory model of JVM, when we operate the data, the JVM memory model changes, thus controlling the operating system, the operating system and CPU complete a very complex communication, and then get the result, send a signal from the IO. And all this inside the computer is the so-called binary running, and then down, there are countless high and low level changes. Our code is actually another representation of these memory models, which can be easily understood and changed.
These are all the contents of this article entitled "what is the relationship between the birth of JVM and the operating system?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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