Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was wondering what differences and relations are between emulator and virtual machine? Is one a special kind of the other, and what are some other kinds in the other? I don't quite understand about these questions from the linked Wikipedia articles.

share|improve this question

As the terms are most commonly used, an emulator is any application that runs code designed for one platform on another platform.

A virtual machine is a special case of an emulator, in that it runs code designed for one platform in a virtualized environment on the same platform - for example, software like VMWare and VirtualBox run code designed for an x86 PC on an x86 PC - this makes it possible to run one operating system on top of another, among other things.

The difference between emulation and virtualization is that with emulation, the entire operating environment is simulated in software, whereas with virtualization, some portion of the work to be done is passed directly to the host CPU. Most modern x86 processors have hardware to accelerate this function. This makes virtualization very fast compared to emulators that have to take some action in response to each operation performed by the guest software.

One popular PC emulator is Bochs. Since it emulates the x86 hardware quite accurately (at the expense of speed), it can be very useful for OS-level debugging.

share|improve this answer
Thanks! So by "platform", you mean the CPU architecture? – Tim Jun 2 '11 at 5:36
I mean the CPU architecture and any other specialized hardware the program might require - with x86 PCs you can use very generic hardware because programs are usually written to take advantage of higher-level APIs, which is one reason x86 virtualization is less complicated than, say, trying to run code written for one ARM platform on another - you can't virtualize your Nintendo DS on your cellphone even when the CPU architecture is largely the same, because you have to emulate all the graphics hardware, which is much more difficult. – user55325 Jun 3 '11 at 21:59
I also elided over the difference between a "virtual machine" (there are generic virtual machines like the JVM or the .NET runtime environment that are sort of like emulators, but they do a lot of just-in-time compilation into native code internally). – user55325 Jun 3 '11 at 22:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .