There are lots of mysterious buzzwords and acronyms (e.g., DPMI, VCPI, protected mode, exceptions) that surround DOS extenders, but in practice they are really quite simple. A DOS extender is simply a software package that lets protected-mode programs run under MS-DOS.Both MS-DOS and the conventional PC BIOS will run on 8088, 80286, 80386, and 80486 processors, but only in real mode. Being downward compatible to the 8088 processor, real mode accordingly limits programs to an address space of one megabyte of memory. Real mode, as practiced on the 8088, also does not offer any memory management. The instability many users experience under MS-DOS or Windows 3.0 is often due to such non-existent, or at best inadequate, memory management. Protected-mode memory management is crucial in a multitasking environment, as it keeps a single, errant application from crashing the system.
DOS extenders allow a programmer to write code that will operate in protected mode. Protected mode as seen on the 80286, 80386, and 80486 has several benefits to the applications programmer. First, the program now has direct access to 16 megabytes of memory on an 80286, and up to four gigabytes under the 80386 architecture. Many programs use a DOS extender for this benefit only.
A DOS extender also helps program reliability by adding memory protection to an application. For example, a protected-mode program that inadvertently writes to location 0000:0000 (pointed to by the null pointer in C) will stop immediately with a protection violation. A conventional MS-DOS program running on an 8088 processor would instead blithely trash the processor's interrupt-vector table, leading to a probable system lockup.
DOS extenders achieve their utility by providing "glue code" that interfaces the protected-mode program to the real-mode operating system. For example, when a program running under a DOS extender asks MS-DOS to read a block of data from disk, it will unknowingly have its call intercepted by the DOS extender. The extender will then allocate a block of memory in the lower one megabyte of memory and switch the processor to real mode. Once the processor is in real mode, the request for a disk read can then be forwarded to MS-DOS, along with a pointer to the temporary buffer in real memory. When the operating system returns, the processor is switched back to protected mode, the data is copied from the temporary to the permanent buffer, and control returns to the application program.