One consequence of the universal computer concept (see von Neumann, John) is that in principle any computer can be programmed to imitate the operation of any other. An emulator is a program that runs on one computer but accurately processes instructions written for another (see also microprocessor and assembler). For example, fans of older computer games can now download emulation programs that allow modern PCs to run games originally intended for an Apple II microcomputer or an Atari game machine. Emulators allowing Macintosh and Linux users to run Windows programs have also achieved some success.
In order to work properly, the emulator must set up a sort of virtual model of the target microprocessor, includ-ing appropriate registers to hold data and instructions and a suitably organized segment of memory. While carrying out instructions in software rather than in hardware imposes a considerable speed penalty, if the processor of the emu-lating PC is much faster than the one being emulated, the emulator can actually run faster than the original machine.
An entire hardware and software environment can also be emulated; this is called a virtual machine. For example, programs such as VMware can be used to run Windows, Linux, and BSD UNIX, each in a separate “compartment” that appears to be a complete machine, with all the neces-sary hardware drivers and emulated facilities.
The term virtual machine can also refer to language such as Java, where programs are first compiled into a platform-independent intermediate “byte code,” which is then run by a Java virtual machine that produces the instructions needed for a given platform.
In the past, emulation was sometimes used to allow pro-grammers to develop software for large, expensive main-frames while using smaller machines. Emulators can also consist of a combination of specially-designed chips and software, as in the case of the “IBM 360 on a chip” that became available for the IBM PCs.
The term emulation is also sometimes used to refer to a program that accurately simulates the operation of a hard-ware device. For example, when printers that included hardware for processing the PostScript typographical lan-guage were expensive, programs were developed that could process the PostScript instructions in the PC itself and then send the output as graphics to a less expensive printer.
No comments:
Post a Comment