While reading the book Computer Power and Human Reason, I began to wonder about emulation. Of course, any Turing machine can emulate any other (but possibly very slowly). However, I am wondering if we’re near a singularity in whole-system emulation.
Whole-system emulation is where an entire computer, including CPU and peripherals, is emulated. This is different from a language VM (e.g., the JVM) or an OS VM (e.g., Linux UML). I gave a talk about VMs a few years ago that may be useful as a refresher. A whole system can be emulated by full instruction interpretation if the host CPU is a different architecture (e.g., Bochs or VICE) or by native execution with traps (e.g., VMware). The only difference is speed.
With the ever-growing prevalence of the x86 architecture, I am wondering whether we are near an emulation singularity. That is, a point in time where every machine ever produced in decent quantity, including every machine currently being sold, can be emulated at full speed on any widely-available desktop.
There are two classes of system that matter in this scenario: old and new machines. Old machines can be emulated via pure horsepower. When I run VICE, my virtual 6502 CPU, video chip, and sound chip are fully interpreted with cycle accuracy. My desktop PC can be a Nintendo DS, numerous arcade games, or even a Playstation 2. The fact that not only the main CPU but various custom graphics chips are being emulated is amazing.
New machines can be emulated at a decent speed if they share the same CPU architecture. I think the spread of x86 is bringing us to that point in the near future. Apple desktops and laptops, Sun servers, and the original Xbox are all based on x86 and can be emulated at full speed. The advent of hardware virtualization makes it even easier to run multiple operating systems on the same platform.
There will continue to be new non-x86 systems (Xbox 360, Playstation 3, cellphones) but the gap is narrowing between their release and the appearance of the first emulator. Since mainstream PCs are used as development platforms, the manufacturers themselves are designing the architecture to be emulated with a minimal amount of peripheral hardware (e.g., a chipset attached via USB).
Will we reach a singularity where every newly-released piece of mainstream hardware is readily emulated on current systems? I think so — what do you think?