“仿真器”和“仿真器”之间的具体区别是什么?和“虚拟机”? [英] What are the specific differences between an "emulator" and a "virtual machine"?
问题描述
我看到它们是不同的东西,但我真的不知道为什么。
有人说:仿真器用于游戏;虚拟机用于操作系统
我不同意此答案,因为除了视频游戏机以外,还有用于平台的仿真器(AMIGA(?))
I see that they are different things but I really can't tell why. Some people say: "emulators are for games; virtual machines are for operating systems" I don't agree with this answers because there are emulators for platforms other than videogame consoles (AMIGA (?) )
您能帮我吗?
推荐答案
虚拟机利用CPU自我虚拟化(无论存在何种程度)都可以为实际硬件提供虚拟化接口。仿真器在不依赖CPU就能直接运行代码并将某些操作重定向到控制虚拟容器的管理程序的情况下仿真硬件。
Virtual machines make use of CPU self-virtualization, to whatever extent it exists, to provide a virtualized interface to the real hardware. Emulators emulate hardware without relying on the CPU being able to run code directly and redirect some operations to a hypervisor controlling the virtual container.
特定的x86示例可能会有所帮助: Bochs 是一个模拟器,即使在兼容的物理处理器上运行,它也可以在软件中模拟整个处理器。 qemu 也是一个模拟器,尽管使用了内核端 kqemu
软件包在模拟的机器与物理硬件匹配时获得了一些有限的虚拟化功能,但是它并不能真正利用完整的x86自虚拟化功能,因此它是一个有限的虚拟机监控程序。 kvm 是虚拟机管理程序。
A specific x86 example might help: Bochs is an emulator, emulating an entire processor in software even when it's running on a compatible physical processor; qemu is also an emulator, although with the use of a kernel-side kqemu
package it gained some limited virtualization capability when the emulated machine matched the physical hardware — but it could not really take advantage of full x86 self-virtualization, so it was a limited hypervisor; kvm is a virtual machine hypervisor.
可以说管理程序模仿受保护的访问;不过,它并不能模拟处理器,更正确地说是受保护的访问。
A hypervisor could be said to "emulate" protected access; it doesn't emulate the processor, though, and it would be more correct to say that it mediates protected access.
受保护的访问意味着事物例如设置页表或读取/写入I / O端口。对于前者,系统管理程序会验证(并通常进行修改,以匹配系统管理程序自己的内存)页表操作并执行受保护的指令本身; I / O操作映射到模拟设备硬件而不是模拟CPU。
Protected access means things like setting up page tables or reading/writing I/O ports. For the former, a hypervisor validates (and usually modifies, to match the hypervisor's own memory) the page table operation and performs the protected instruction itself; I/O operations are mapped to emulated device hardware instead of emulated CPU.
为了使事情复杂化, Wine 还是一个虚拟机管理程序/虚拟机(尽管ABI级别更高),而不是一个仿真器(因此 Wine不是一个仿真器)。
And just to complicate things, Wine is also more a hypervisor/virtual machine (albeit at a higher ABI level) than an emulator (hence "Wine Is Not an Emulator").
这篇关于“仿真器”和“仿真器”之间的具体区别是什么?和“虚拟机”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!