OS/2 Version 2.0 provides the user with the ability to run multiple concurrent DOS applications, and to multitask these applications with OS/2 applications. In previous versions of OS/2, support for DOS applications was limited to a single DOS session, known as the DOS Compatibility Box, in which the amount of memory available to the DOS application was restricted. Applications running in the DOS Compatibility Box could operate in full-screen mode only, and were suspended when switched to the background.
Support for DOS applications has been completely redesigned in OS/2 Version 2.0, which now provides for the execution and management of multiple concurrent DOS applications, where each application is executed as a single-threaded, protected mode OS/2 program. This capability is provided by a component of OS/2 Version 2.0 known as Multiple Virtual DOS Machines (MVDM).
MVDM introduces powerful DOS application support to OS/2 by exploiting the virtual 8086 (V86) mode of the Intel 80386 processor. This mode of operation allows the emulation of an Intel 8086 processor and associated hardware devices within a protected mode 80386 task. OS/2 Version 2.0 uses the virtual 8086 mode to allow the creation of multiple instances of independent virtual DOS machines. Through this technique, a virtual interface is provided to each virtual DOS machine, giving the impression that the application running in that machine owns all the required resources, both hardware and software.
Each virtual DOS machine runs as a protected mode process, in a manner similar to an OS/2 application. The use of protected mode allows pre-emptive multitasking of DOS applications and provides a protected system environment in which DOS applications can execute. This means that system memory and all other applications (both DOS and OS/2), are protected from ill-behaved applications, and the user can terminate a DOS application which is "hung". An errant DOS application can affect only its own virtual DOS machine; other applications in the system will not be affected.
Figure "Concurrent DOS Applications under the Workplace Shell"
Each virtual DOS machine has a great deal more available memory than did the DOS Compatibility Box implemented in previous versions of OS/2. Depending on the use of DOS device drivers and TSR programs, it is possible to have as much as 630KB of available memory for application execution. In addition, OS/2 Version 2.0 supports the use of the Lotus**-Intel-Microsoft (LIM) Expanded Memory Specification (EMS) and the Lotus-Intel-Microsoft-AST** (LIMA) Extended Memory Specification (XMS) to provide additional memory for those DOS applications which are capable of using such memory extenders. OS/2 Version 2.0 maps this expanded or extended memory into the system's linear memory address space, and manages it in the same manner as any other memory.
Each virtual DOS machine may run either in full-screen mode or within a Presentation Manager window. A window containing a DOS application may be sized and manipulated in the same manner as any other Presentation Manager window, and other Presentation Manager desktop features are readily available such as the ability to cut/copy/paste information between applications using the clipboard, or the ability to change fonts.
From the user's perspective, DOS applications behave exactly like VIO applications. DOS applications have the following characteristics:
Furthermore, DOS applications under OS/2 Version 2.0 have advantages over VIO applications:
The sole restriction for DOS applications running in a virtual DOS machine when compared with VIO applications is that DOS applications in virtual DOS machines cannot be used in process subtrees. That is, VDMs cannot be run as child processes of either an OS/2 session or another VDM session.
There are some DOS applications and products that cannot be supported by DOS emulation, due to the nature of the emulation code and the multitasking and protection demands of OS/2 Version 2.0. Unsupported products/functions include:
Some of these applications may be run under OS/2 Version 2.0 by booting a specific version of DOS in a virtual DOS machine, using the Virtual Machine Boot feature of MVDM. This feature is described in detail in Virtual Machine Boot.
Application compatibility in the virtual DOS machine is also enhanced over previous versions of OS/2. A virtual DOS machine can be used to execute DOS-based communications applications and other applications which address hardware I/O devices, through the use of virtual device drivers, which map device driver calls from DOS applications to the appropriate physical device driver within the operating system. Applications using hardware devices which do not have to be shared with DOS applications in the same system may access these devices using the standard DOS device drivers, without the need for a virtual device driver. Certain restrictions still apply with respect to communications line speed and time-critical interrupt handling.
A powerful new feature called DOS Settings allows an individual to easily tailor, via Presentation Manager windows, the resources, such as video and memory, available to an application running in a virtual DOS machine, and thus optimize the way in which a DOS application runs.