RE: Prisoner of cyberspace

Joe Barrera (joebar@MICROSOFT.com)
Tue, 12 May 1998 21:23:59 -0700


> At that time, MS didn't know about swapping yet. Even Win3 did not swap on
286
> machines. Not that it was not possible. AFAIK, Unix/Xenix implementations
worked
> fine on 286 with swapping. The guys who wrote Windows just didn't know how
to do
> it, they rather relied on the hardware paging in the 386.

No, you're wrong.

Even before the 286 existed, Windows would swap to "expanded memory".
Expanded memory was physical memory not directly addressable by the
8086/8088 (the point being that the physical address space was already
full). The expanded memory manager (emm.sys) would manage the swapping
(reading and writing) of data between conventional (< 1MB) and expanded
memory. An example of expanded memory was the Intel AboveBoard card.

When the 286 first came out, an expanded memory manager was written to
present the physical memory beyond 1MB as expanded memory. Later, Windows
2.x was written to use "extended memory" on the 286, allowing any portion of
physical memory (even beyond the 1MB limit) to be mapped directly into a
process address space. At this point, you're no longer swapping; you're just
fiddling with segment registers.

Finally, when the 386 came out, Windows 3.0 was written to support a third
mode of running -- enhanced mode -- which took advantage of the 386's paging
hardware. But Windows 3.0 still supported "protected mode" (using 286
segmentation) and even "real mode" (for 8088). Windows 3.1 finally dropped
support for the 8088. Only with Windows 95 was support dropped for the 286.
(And only with Windows 98 is support being dropped for the 386, the 486SX,
and anything else without floating point).

(Orthogonally, there is a "swapdisk=x:" option for Windows supported at
least since Windows 2.x. You can specify a swapdisk for both Windows and
non-Windows (i.e., DOS) apps.)

I'm sure I've gotten some of the details wrong. It's hard to track down
references for some of this information. Here are some URLs that I used,
along with some DOS and Windows books (which I believe are already on my
FoRK recommended list):

Expanded Memory under Windows 3.0:
<http://support.microsoft.com/support/kb/articles/q51/7/37.asp>
http://support.microsoft.com/support/kb/articles/q51/7/37.asp

Windows 3.0 Modes and Memory Requirements:
<http://support.microsoft.com/support/kb/articles/q58/3/17.asp>
http://support.microsoft.com/support/kb/articles/q58/3/17.asp

Conventional, System, Extended, and Expanded Memory Defined:
<http://support.microsoft.com/support/kb/articles/q69/6/47.asp>
http://support.microsoft.com/support/kb/articles/q69/6/47.asp

Windows Version History:
<http://support.microsoft.com/support/kb/articles/q32/9/05.asp>
http://support.microsoft.com/support/kb/articles/q32/9/05.asp

- Joe

Joseph S. Barrera III <joebar@acm.org>
<http://research.microsoft.com/~joebar/>
Phone, Office: (415) 778-8227; Cellular: (415) 601-3719; Home: (650)
588-4801
Microsoft Research (BARC), 301 Howard Street, San Francisco, CA 94105-6605
The opinions expressed in this message are my own personal views and do not
reflect the official views of Microsoft Corporation.