Gerald Malan, Richard Rashid, David Golub, Robert Baron. DOS as a Mach 3.0 Application. [postscript] Proceedings of the Usenix Mach Symposium, November 1991.

We have implemented support for the DOS operating system on top of the Mach 3.0 kernel. This support included machine-dependent kernel modifications for the i386/i486 architecture to handle virtual 8086 mode, a multithreaded emulation of the IBM PC's VGA display and I/O devices, direct support for a number of common DOS functions and frequently loaded DOS drivers, and code to integrate DOS functionality with the existing 4.3 BSD Unix Server. The resulting systems allows multiple virtual DOS environments, supports DOS versions 3.1 to 5.0, and is capable of running common DOS software including performance sensitive PC entertainment software such as Wing Commander-a high speed space combat simulation system.

Many lessons were learned during the course of this work. DOS stresses a number of Mach features infrequently used by Unix emulation. The timing and latency demands of DOS applications, especially those with animation and sound, are dramatically different from those of typical Uni\ x applications. Because most DOS programs interact intimately with the underlying PC hardware, DOS emulation expanded our knowledge about the behavior of Mach 3.0 when asked to provide a virtual machine environment rather than pure client/server support. In particular, quirks of the PC architecture-such as support for the so-called "high memory area" above 0x1000000-had to be precisely emulated.

This paper describes our implementation, its capabilities and limitations ,and the lessons learned about Mach in the course of our development effort.