没有虚拟化支持的Java虚拟机如何在系统上工作? [英] How Java Virtual Machine can work on system without virtualization support?

查看:194
本文介绍了没有虚拟化支持的Java虚拟机如何在系统上工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果必须对虚拟化提供硬件支持,那么Java虚拟机如何在不支持虚拟化的计算机上运行?还是JVM不是虚拟机?

If hardware support is a must for virtualization, how can Java Virtual Machines run on machines without support for virtualization ? Or is JVM not a virtual machine ?

推荐答案

JVM的虚拟性与VirtualBox或VMWare虚拟机的意义不同.它是实现Java字节码的机器",而不是实际硬件的虚拟版本.

A JVM is not virtual in the same sense as a VirtualBox or VMWare virtual machine. It is a 'machine' that implements the Java bytecode, not a virtualized version of actual hardware.

术语虚拟机"是很久以前创造出来的,用于以下情况:

The term-of-art 'virtual machine' was coined a very long time ago for the following scenario:

  1. 组成一台计算机,例如Knuth的MIX.
  2. 编写一个实现人造计算机的计算机程序.
  3. 运行程序

此虚拟机运行时,它是一个完全普通的程序,完全在用户模式下运行.它不需要硬件或操作系统的特殊帮助即可正常工作.对于JVM尤其如此,因为Java字节码不处理底层硬件I/O或其他难以模拟的事情.

When this virtual machine runs, it's a completely ordinary program, running completely in user mode. It needs no special help from the hardware or operating system to work reasonably well. This is especially true of the JVM, since the Java byte code does not deal with low-level hardware I/O or other things which are hard to simulate.

从历史上看(为了选择一个特定的实例),IBM发明了VM/370. VM/370使用术语虚拟机"的另一种含义.从后一种意义上讲,硬件和操作系统可以协同工作,以使单个物理机可以托管(或多或少)同一架构的多个虚拟实例,其中写入了整个操作系统的多个副本就像它们或多或少地在裸机上运行一样.后来,X86的设计具有简化此功能的功能.

Later, historically, (to pick a particular instance), IBM invented VM/370. VM/370 uses the other sense of the term 'virtual machine'. In this later sense, the hardware and operating system cooperate to allow a single physical machine to host multiple virtual instances of (more or less) the same architecture, in which multiple copies of the whole operating system are written as if they are running on more or less bare hardware. Later, the X86 was designed with features to facilitate this.

因此,是的,任何虚拟机都在使用某些物理硬件,除非您用绕着桌子传递的纸来实现它(步调为John Searle).但是,当虚拟机与运行的虚拟机没有任何相似之处时,就不需要操作系统和硬件的特殊帮助,也不需要像VM/370或VMware这样复杂的东西.

So, yes, any virtual machine is making use of some physical hardware, unless you implement it with pieces of paper passed around a table (pace John Searle). But when the virtual machine bears no resemblance to the machine it is running on, then there's no need for special help from the operating system and hardware, and no need for anything as complex as VM/370, or VMware.

这篇关于没有虚拟化支持的Java虚拟机如何在系统上工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆