Introduction

OS/2 Version 2.0 is designed to fully exploit the advanced features of the Intel 80386 processor. A major innovation of the 80386 is its support for the execution of multiple 8086 tasks within the 80386 protected mode environment. An 8086 task in this environment is called a virtual 8086 (V86) task. Under OS/2 Version 2.0, V86 tasks are implemented as virtual DOS machines (VDMs), and each runs as a single-threaded, protected mode process. See also Figure "MVDM System Structure Overview". The OS/2 scheduler controls task switching for V86 processes in a way similar to the manner in which it controls other OS/2 application processes. When a task switch occurs, the VM bit in EFLAGS contained in the V86 process's task state segment indicates the type of the current process. If the VM bit is set, indicating that the process is a VDM, the processor switches to V86 mode.

In this area, performance has been improved over previous versions of OS/2, since the processor is never switched to real mode. Switching from protected mode to real mode takes a long time since all CPU register contents must be saved and paging must be disabled before DOS registers are loaded. Switching to real mode is often accomplished by resetting the CPU, which is very time consuming. The V86 mode of the processor allows the system to run both OS/2 and DOS applications in protected mode.

Compared to previous versions of OS/2, DOS applications running in VDMs may:

  • Run full-screen or in a window
  • Run in a background session and not be suspended
  • Use the clipboard    

    Full-screen graphics applications may be switched to windowed mode where the graphics will be displayed as a bitmap. Switching between modes can be done via the system icon menu when in windowed mode. If in full-screen mode, the user must first switch to the Presentation Manager screen group. Selecting Windowed in the menu of the DOS program icon switches the application to windowed mode. To facilitate mode switching, the hot-key combination Alt+Home may be used.

    While in full-screen mode, the user may copy only the entire contents of the screen to the clipboard. Switching to windowed mode enables the user to copy parts of the screen to the clipboard by selecting areas with the mouse.

    DOS compatibility is achieved through a combination of hardware and software which ensure the successful execution of DOS applications. Since DOS compatibility is something of a "moving target", MVDM has been architected to provide the maximum possible flexibility. When attempting to ensure the proper execution of a DOS application, typical variable factors to be considered are the hardware and ROM BIOS of the machine, as well as DOS and the application itself.

         DOS Operating System   + Hardware
       + DOS Application
       ----------------------
       = Compatibility
    

    The following DOS functions are supported by virtual DOS machines:

  • All documented DOS system interfaces

  • Most direct ROM BIOS interfaces

  • Memory extenders 

    VDMs have certain restrictions:

  • Single tasking only; no child processes    

    Figure "MVDM System Structure and Control Flow" provides an overview of the OS/2 Version 2.0 system structure, showing the MVDM kernel and virtual device drivers in relation to key components of the operating system kernel and physical device drivers which provide services to MVDM.

    Note that virtual device drivers typically access hardware devices through a physical device driver. Direct communication between virtual device drivers and the hardware (as shown in Figure "MVDM System Structure and Control Flow") is used only in exceptional circumstances. One such case is the virtual video device driver, VVIDEO.SYS, which communicates directly with hardware in order to achieve the highest possible level of performance.


    [Back: MVDM Architecture]
    [Next: Virtual DOS Machine Manager (VDMM)]