JVM (およびおそらく CLI も) は、仮想マシン(「通常の」プログラム スタックの x86 に相当) または仮想OS (Windows に相当) と見なされますか?
2 に答える
Strictly speaking, it is a virtual machine, ie: it executes a special low-level language (similar to x86 ASM. CLI uses MSIL, JVM uses "byte codes") and translates them into the target machine's op-codes (x86, x86_64, ARM .. etc.) for execution on the host CPU.
It also manages marshaling (ie: correct handling and passing through of variables to native memory stack/heap) to allow function calls from inside the managed world to the outside OS on which the VM runs.
Practically though, neither the JVM nor the CLI alone are very helpful except for automated garbage collection and CPU-architecture-independence, but they are complemented by a large base library (the Java classes, or the .NET BCL) which allows you to do many platform-y things without having to call platform specific APIs and use marshaling manually for everything.
That's why there is a different Java Runtime Environment for each OS. Each one's JVM translates to a specific CPU arch, and uses different platform specific-APIs to accomplish what the unified base library exposes to you as a friendly API inside the managed world.
Hope that helps you.
jvm は実際のコンピューターと見なされますが、ハードウェアでは実現されません。マシンには、独自の記憶容量、独自のメモリ モデル、独自の中央処理装置の固有の動作、および独自の内部マシン コードがあります。このマシンは、クラス、API などで表される新しい可能性とモジュールで拡張可能です...
ほとんどの仮想マシンと同様に、独自のスタック ベースのアーキテクチャを備えています。