386 Enhanced Mode

386 Enhanced Mode: A mode that Windows runs in to access the virtual memory capabilities of the Intel 80386 processor. This mode allows Windows to use more memory than is physically available and to provide multi-tasking for non-Windows applications.

386 enhanced mode uses the 80386 processor's protected mode to provide direct access for Windows and Windows applications to up to 16MB of extended memory. In addition, the virtual 8086 mode of the 80386 is used to provide multiple DOS environments for non-Windows applications. Most DOS applications can be run in a window. Virtual memory support is provided, for Windows applications only, using the demand paging feature of the 80386 processor.

386 enhanced mode requires an 80386 processor or above, at least 2MB of installed memory, with a minimum 1MB of free extended memory. The XMS driver HIMEM.SYS must also be loaded. Windows applications must be written to comply with the memory management rules for Windows 3.0 to run in 386 enhanced mode.

The 386 enhanced mode of Windows 3.0 provides a number of additional capabilities over standard mode:

  • The capability for pre-emptive multitasking of DOS sessions

  • Demand paging for efficient virtual memory.

    Both of these capabilities are provided by OS/2 Version 2.0 itself for both DOS and Windows applications, independent of the Windows kernel. There is hence no need to provide such functions within the Windows kernel.

    There are, however, a small number of Windows applications which require enhanced mode to run. Such applications require enhanced mode either because they rely on features only available in enhanced mode, such as Windows 3.0's permanent swap file capability (such as Caere Omnipage**), or have been coded using the WINMEM32.DLL, a set of routines that provide some 32-bit functions for Windows applications, such as Wolfram Research's Mathematica**.

    It is believed that there are only, at maximum, three or four such applications on the market, which represents less than 0.3% of Windows 3.0 applications (assuming Microsoft's quoted figure of 1500 Windows applications). It is unlikely there will ever be many in the latter category of applications, since the WINMEM32.DLL is very difficult to use, and Microsoft itself warns in Appendix E of the Windows Programmer's Reference: "only experienced Windows application programmers with extensive experience writing assembly-level code should attempt to use these functions in an application."

    This warning is necessary because even something as basic as memory management using these routines can be very complex, and requires the programmer to create assembly language interfaces between the 16- and 32-bit parts of a program (note that such "thunks" are provided by OS/2 Version 2.0 between 16-bit and 32-bit modules; see OS/2 Version 2.0 - Volume 1: Control Program). Charles Petzold, possibly the most widely respected authority on Windows programming, whose book on the subject is a standard reference work, concluded on this subject that "something is seriously wrong when memory access becomes difficult", and contrasted the current Windows approach with the ease of 32-bit memory management under OS/2 Version 2.0.

    Applications which require enhanced mode will not be supported by OS/2 Version 2.0. Support of this mode requires Windows to run at the Ring 0 privilege level in the 80386 processor, which allows Windows or a Windows application to access all system memory and resources, including those belonging to the operating system itself. This could result in a serious breach of system integrity, and is therefore not permitted under OS/2 Version 2.0.

    So, although there will almost certainly be a very small minority of Windows applications that will not run under OS/2 Version 2.0, the vast majority will run, and in a mode which allows access to their full function. Indeed, to the Windows application, the environment will appear exactly the same as if the application were running under DOS/Windows in standard mode.


    [Back: Standard Mode]
    [Next: Windows Applications under OS/2 Version 2.0]