ArticleslgStudy

computer science

DOS Protected Mode Interface

DOS Protected Mode Interface is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand DOS Protected Mode Interface rather than just read about it. In short: In computing, the DOS Protected Mode Interface (DPMI) is a specification introduced in 1989 which allows a DOS program to run in protected mode, giving access to many features of the new PC processors of the time not available in real mode. It was initially developed by Microsoft for Windows 3.0, although Microsoft later turned control of the specification over to an industry committee with open membership.

Key takeaways

  • DOS Protected Mode Interface belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect DOS Protected Mode Interface to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of DOS Protected Mode Interface from memory before moving on to harder problems.

Reference excerpt

In computing, the DOS Protected Mode Interface (DPMI) is a specification introduced in 1989 which allows a DOS program to run in protected mode, giving access to many features of the new PC processors of the time not available in real mode. It was initially developed by Microsoft for Windows 3.0, although Microsoft later turned control of the specification over to an industry committee with open membership. Almost all modern DOS extenders are based on DPMI and allow DOS programs to address all memory available in the PC and to run in protected mode (mostly in ring 3, least privileged).

Overview DPMI stands for DOS Protected Mode Interface. It is an API that allows a program to run in protected mode on 80286 series and later processors, and do the calls to real mode without having to set up these CPU modes manually. DPMI also provides the functions for managing various resources, notably memory. This allows the DPMI-enabled programs to work in multi-tasking OSes, allowing an OS kernel to distribute such resources between multiple applications. DPMI provides only the functionality that needs to be implemented in supervisor mode. It can be thought of as a single-tasking microkernel. The rest of the functionality is available to DPMI-enabled programs via the calls to real-mode DOS and BIOS services, allowing the DPMI API itself to remain mostly independent of DOS. Things that make DPMI API DOS-specific, are just 3 functions for managing DOS memory, and the letter "D" in the "DPMI" acronym. A DPMI service can be 16-bit, 32-bit, or "universal" and is called the DPMI kernel, DPMI host, or DPMI server. It is provided either by the host operating system (virtual DPMI host) or by a DOS extender (real DPMI host). The DPMI kernel can be a part of a DOS extender such as in DOS/4GW or DOS/32A, or separate, like CWSDPMI or HDPMI. The primary use of DPMI API is to allow DOS extenders to provide the host-OS-agnostic environment. DOS extender checks the presence of a DPMI kernel, and installs its own only if the one was not installed already. This allows DOS-extended programs to run either in a multitasking OS that provides its own DPMI kernel, or directly under bare-metal DOS, in which case DOS extender uses its own DPMI kernel. Windows 3.x and 9x's user-mode kernels are built with a DOS extender, so they fully rely on a DPMI API that is provided by Windows's ring-0 kernel.

History The first DPMI specification drafts were published in 1989 by Microsoft's Ralph Lipe. While based on a prototypical version of DPMI for Windows 3.0 in 386 enhanced mode, several features of this implementation were removed from the official specification, including a feature named MS-DOS Extensions or DOS API translation that had been proposed by Ralph Lipe in the original drafts. Most of it was implementing DOS and BIOS interfaces (due to this history some INT 21h APIs like 4Ch have to be implemented by all DPMI implementations). DPMI version 0.9 was published in 1990 by the newly formed DPMI Committee. The version number 0.9 of the resulting specification was chosen to reflect the stripped-down nature and incomplete status of the standard the members of the DPMI Committee could agree upon. While Windows reports DPMI version 0.9 for compatibility, it actually implements the other parts as well, since they present a vital part of the system. This undocumented full nature of DPMI has become known as "true DPMI" in the industry. The DPMI standard was not the only effort to overcome the shortcomings of the VCPI specification. At the same time that Microsoft developed DPMI for Windows 3.0, another industry alliance including Intel's Software Focus Group, Lotus, Digital Research, Interactive Systems and others developed a specification named Extended VCPI (XVCPI) to make the memory management and multitasking capabilities of the 386 available for extended DOS applications. When it turned out that Microsoft's DPMI proposal addressed a number of similar issues and was supported by Windows, these efforts led to the creation of the DPMI Committee in February 1990 during a meeting at Intel in Santa Clara. In 1991, the DPMI Committee revised DPMI to version 1.0 in order to incorporate a number of clarifications and extensions, but it still did not include the missing "true DPMI" bits implemented in Windows. In fact, "true DPMI" never became part of the official DPMI specification, and Windows likewise never implemented the DPMI 1.0 extensions (and not many DPMI hosts did). While DPMI is tailored to run extended DOS application software in protected mode and extended memory, it is not particularly well suited for resident system extensions. Another specification named DPMS, developed by Digital Research / Novell around 1992, specifically addresses requirements to easily relocate modified DOS driver software into extended memory and run them in protected mode, thereby reducing their conventional memory footprint down to small stubs. This is also supported by Helix Cloaking. The DPMI "method" is specific to DOS and the IBM PC. Other computer types were upgraded from 16-bit to 32-bit, and the advanced program support was provided by upgrading the operating system with a new 32-bit API and new memory management/addressing capabilities. For example, the OS/2 core system supports 32-bit programs, and can be run without the GUI. The DPMI solution appears to be mainly needed to address third party need to get DOS protected mode programs running stably on Windows 3.x before the dominant operating system vendor, Microsoft, could or would address the future of 32-bit Windows. In addition, Microsoft didn't see the answer to the 32-bit transition as a 32-bit DOS, but rather a 32-bit Windows with a completely different (and incompatible) API.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with DOS Protected Mode Interface

Start with the simplest possible case. Write down what DOS Protected Mode Interface claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to DOS Protected Mode Interface before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about DOS Protected Mode Interface ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of DOS Protected Mode Interface

In research
DOS Protected Mode Interface appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses DOS Protected Mode Interface in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
DOS Protected Mode Interface is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer-related introductions in 1989, DOS extenders, DOS memory management, so understanding it makes those chapters shorter.
In everyday life
Look for DOS Protected Mode Interface outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “DOS Protected Mode Interface” →

How to study DOS Protected Mode Interface in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what DOS Protected Mode Interface means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain DOS Protected Mode Interface out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is DOS Protected Mode Interface in simple terms?

In computing, the DOS Protected Mode Interface (DPMI) is a specification introduced in 1989 which allows a DOS program to run in protected mode, giving access to many features of the new PC processors of the time not available in real mode. It was initially developed by Microsoft for Windows 3.0, a…

Why does DOS Protected Mode Interface matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study DOS Protected Mode Interface?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on DOS Protected Mode Interface.

Tags

  • Computer-related introductions in 1989
  • DOS extenders
  • DOS memory management
  • DOS technology

Keep exploring