A significant part of OS/2 Version 2.0 is its ability to multitask DOS sessions along with OS/2 sessions, using the Multiple Virtual DOS Machines feature of OS/2 Version 2.0. In previous versions of OS/2, support for DOS applications was limited, with low available memory and a single DOS session, which operated in full-screen mode only and suspended when in the background.
The DOS support has been totally rewritten in OS/2 Version 2.0, and allows multiple concurrent DOS applications where each is executed as a single-threaded, protect mode OS/2 program. This method of implementation uses the virtual 8086 mode of the 80386 processor, and provides normal OS/2 levels of memory protection; that is, it provides protection of system memory and other applications, isolation from illegal memory accesses by ill-behaved applications, and the ability to terminate sessions where applications are "hung". DOS sessions may also be multitasked along with all other OS/2 sessions.
DOS support is achieved through the use of virtualization techniques, allowing the creation of multiple instances of separate, independent virtual DOS machines. In this way, a virtual interface is provided to each DOS machine, giving the impression that each application owns all the required resources, both hardware and software.
Each virtual DOS machine has more base memory than the DOS Compatibility Box implemented in previous versions of OS/2; more than 630KB of free base memory (that is, memory below the 640KB line) is available for each virtual DOS machine. OS/2 Version 2.0 also supports the use of Lotus**-Intel-Microsoft** (LIM) expanded memory (EMS) Version 4.0 emulation and extended memory (XMS) Version 2.0 to provide additional memory for those DOS applications which are capable of using such extensions. OS/2 Version 2.0 maps this extended or expanded memory into the system's normal linear memory address space, and manages it in the same manner as any other allocated memory. The DOS Protect Mode Interface (DPMI) specification is also supported to allow access to memory above 1MB.
The ability of a virtual DOS machine to run within a Presentation Manager window provides immediate productivity gains to existing DOS applications, since they may utilize Presentation Manager desktop features. These features include window manipulation and the ability to cut/copy/paste information between applications using the clipboard.
Application compatibility in the virtual DOS machine is also enhanced over previous versions of OS/2. The 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 the device driver calls from the applications to the appropriate physical device driver within the operating system. Applications using hardware devices which are not required to be shared with other applications in the same system may be accessed 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.
Application compatibility in a virtual DOS machine is further enhanced by the DOS Settings feature, which allows virtual DOS machines to be customized to suit the requirements of the applications running in them. Properties such as video characteristics, hardware environment emulation, and the use of memory extenders can all be customized using this feature.
The concept of Multiple Virtual DOS Machines, and its implementation in OS/2 Version 2.0, is described in more detail in OS/2 Version 2.0 - Volume 2: DOS and Windows Environment.