Dec 142017
 
An excellent text file on Windows 3.0 memory management.
File WW0335.ZIP from The Programmer’s Corner in
Category Windows 3.X Files
An excellent text file on Windows 3.0 memory management.
File Name File Size Zip Size Zip Type
WW0335T.TXT 73176 20057 deflated

Download File WW0335.ZIP Here

Contents of the WW0335T.TXT file


======================================================================
INTRODUCTION
======================================================================
A new angle on memory management

Version 3.00 of Microsoft Windows brings a new angle to PC memory
management. It provides a protected mode graphical operating
environment that runs existing DOS applications and allows Windows
applications to break the 640K barrier. Windows 3.00 memory management
is simpler in many ways than that of previous versions. However, its
flexibility continues to present a challenge to those who want to
understand its operation in depth. This document examines the three
types of memory that Windows 3.00 can use (conventional, extended, and
expanded) and discusses how the three modes of Windows 3.00 (real,
standard, and enhanced) operate and use memory.


======================================================================
MEMORY TYPES

======================================================================

There are three different kinds of memory that can be installed in
your machine. These are conventional, extended, and expanded. In
addition, IBM PC-compatible machines contain a 384K reserved I/O
address space.

CONVENTIONAL MEMORY
===================

Conventional memory is the first 640K of memory in your machine (see
Figure 1). DOS has a limit of 640K of addressable memory, and all DOS
applications have to run within this conventional memory. All of the
Windows 3.00 operating modes share this limitation for running DOS
applications, but standard and enhanced modes break the 640K
limitation for running Windows applications. Windows 3.00 enhanced
mode can create multiple virtual DOS machines (for more information on
virtual DOS machines, see the "Enhanced Mode and Conventional Memory"
section of this application note).

NOTE: Enhanced mode Windows 3.00 also allows DOS applications to
break the 640K barrier if they are written to use the Microsoft DOS
Protected Mode Interface (DPMI) specification. DPMI allows DOS
applications to run in protected mode under Windows 3.00, using up
to 16 megabytes of extended memory directly. Applications must be
specifically written for DPMI to provide this feature.

**************************************************
Figure 1: Conventional and Extended Memory

Graphic not available in text-formatted file.
Please see printed document for Figure 1.
**************************************************


384K RESERVED I/O ADDRESS SPACE
===============================

Between the top of conventional memory at 640K and the start of
extended memory at 1024K lies the 384K reserved I/O address space (see
Figure 2). This area does not contain physical memory. Mapped into the
384K reserved I/O address space are the BIOS (basic input/output
system) ROM chips and the display adapter memory. When you install
other accessory cards, such as network adapters, they occupy space
within the 384K reserved I/O address space as well. It is important to
remember that the 384K reserved I/O address area is always located in
the same area of the IBM PC-compatible computer's address space: from
640K to 1024K (A000 to FFFF hexadecimal). There are no exceptions to
this rule.

This means that a standard IBM-compatible machine with 640K of
conventional memory installed really has 1 megabyte of address space.
The system memory occupies the first 640K, and the 384K reserved I/O
address space occupies the area from 640K to 1 megabyte. This does not
mean that the machine has 1 megabyte of memory. A machine with 1
megabyte of physical memory has an address space of 1408K. This
consists of the 640K conventional memory, the 384K reserved I/O
address space, and the 384K of extended memory starting at 1024K. The
IBM PS/2 Models 50, 50Z, and 60 are examples of machines that always
ship with at least 1 megabyte of memory installed.

EXTENDED MEMORY
===============

Extended memory is the simplest type of add-on memory to understand
(see Figure 1). It is also the type of memory used by Windows 3.00
running in standard or enhanced operating mode. Extended memory is
simply a seamless continuation of the original 1 megabyte address
space on 80286 and 80386 computers. Extended memory always starts
exactly at 1024K, where the 384K reserved I/O address space ends.
There are no exceptions.

It is not possible for an 8086 or 8088 machine to have extended
memory. This is a hardware limitation of the 8086/8088 processors,
which can handle only 1024K of total address space (that is, 640K
system memory plus 384K reserved I/O address space). The 80286
processor can address 16 megabytes of total memory and the 80386
processor can address up to 4 gigabytes. Note that PC manufacturers
often refer to extended memory as expansion memory, which is not to be
confused with expanded memory.

Windows 3.00 and all applications running under Windows access
extended memory via the Microsoft eXtended Memory Specification (XMS).
Rather than accessing extended memory directly, access is made via an
XMS driver. This driver is called HIMEM.SYS. Older DOS applications
that check available extended memory via the interrupt 15 service 88H
will not see any extended memory with an XMS driver loaded. These
applications must use the XMS, instead of interrupt 15, to access
extended memory.

EXPANDED MEMORY
===============

Older versions of Windows use mostly expanded memory. Today, Windows
3.00 uses expanded memory only when running in real mode. However, it
is important to understand the concept of expanded memory if you still
run DOS applications that use it. There are two different kinds of
expanded memory, differentiated by their Lotus/Intel/Microsoft (LIM)
Expanded Memory Specification (EMS) version number.

LIM 3.2 Expanded Memory
-----------------------

We discussed earlier that the old PC/XT machines with 8086/8088
processors can address only 640K of memory. You can't add more than
640K of standard memory to the system, but you can provide more than
640K through a technique called bank switching. Expanded memory uses
an empty area in the 384K reserved I/O address space of the machine to
provide this functionality.

Figure 3 shows the memory addressing range of an 8088-family processor
on the left and an expanded memory card on the right. To use an
expanded memory card, you must load a device driver to let the card
know how to communicate with the PC. This device driver is called an
Expanded Memory Manager, or EMM. The LIM 3.2 EMM establishes a 64K
page frame within the 384K reserved I/O address space to perform EMS
bank switching. The 64K page frame consists of four 16K contiguous
pages. LIM 3.2 expanded memory won't work without a 64K contiguous
page frame.

The page frame is the area where the expanded memory manager maps
information into and out of the RAM of the expanded memory card.
Information is not physically copied from the EMS card to the RAM of
the computer. The device driver simply changes the card's page
registers to make the page frame point to the data on the expanded
memory card. The data then appears in the page frame, and your
application can access it.

**************************************************
Figure 2: The 384K Reserved I/O Address Space

(Use this page for reference when troubleshooting
memory address conflicts.)

Graphic not available in text-formatted file.
Please see printed document for Figure 2.
**************************************************


**************************************************
Figure 3: LIM 3.2 Expanded Memory

Graphic not available in text-formatted file.
Please see printed document for Figure 3.
**************************************************


LIM 4.0 Expanded Memory
-----------------------

The LIM 3.2 standard is fine for storing data such as spreadsheets in
expanded memory, but it does not help for multitasking. This is why
Lotus, Intel, and Microsoft created the LIM 4.0 standard.

Comparing Figures 3 and 4 shows two of the major differences between
LIM 3.2 and 4.0. First, you can have more than four 16K pages, much
more. LIM 4.0 supports up to 64 pages, which are enough to bank 1
megabyte of memory at once. Second, the page frame itself no longer
has to be four contiguous 16K pages. In fact, you need no page frame
at all. Whichever EMS version you are dealing with, the basic
operating principle of bank switching is still at work.

Backfilling
-----------

With LIM 4.0's limit of 64 16K pages, you have enough pages to bank
switch the entire conventional address range of the processor. Yet
there must be no active ROM or RAM of any sort where you put an
expanded memory page. This means you can't map EMS pages on top of
anything that is already occupying address space in your machine (such
as loaded DOS or video/system ROM). On the 80286 processor, this means
you should disable as much motherboard memory as possible (down to
256K) and let the expanded memory card supply that memory. This
process is called backfilling. This doesn't mean that your computer
will have only 256K -- your programs still see a 640K machine. But
since the expanded memory card is now supplying the memory, it can
bank switch the memory. This capability is called (erroneously) "large
page frame."

The 80386 processor has a built-in ability to readdress any page of
memory to any other location. This means you don't have to backfill on
an 80386 to get large page frame LIM 4.0 functionality, nor do you
need an expanded memory board. It's easy to convert your 80386's
extended memory to expanded with an 80386 Expanded Memory Manager such
as Microsoft EMM386.SYS.

If you're using an expanded memory board on an 80386 machine, read
your manual carefully before you backfill. Not all memory boards have
the register support to supply more than four 16K pages (LIM 3.2).
Though a memory driver may conform to the LIM 4.0 specification, that
does not mean the hardware can provide more than four pages. Also,
since Windows 3.00 supports extended memory directly, backfilling
expanded memory will not give you any advantages unless you plan to
run only real mode Windows.

**************************************************
Figure 4: LIM 4.0 Expanded Memory

Graphic not available in text-formatted file.
Please see printed document for Figure 4.
**************************************************


LIMulators
----------

There are some programs available that emulate expanded memory using
extended memory and/or hard disk space. These programs are sometimes
known as LIMulators. They are not much of an advantage because
although they supply expanded memory, they are not hardware. They must
place a 64K EMS page frame in conventional memory and also take up
space for the driver itself. LIMulators generally take upward of 80K
conventional memory to run. Since conventional memory is the most
precious memory on your machine, we do not recommend these types of
programs. They are also extremely slow.

Expanded Memory Difficulties
----------------------------

Expanded memory requires a page frame to work, and the page frame is
located within the 384K reserved I/O address space of your machine.
Unfortunately, your EMM is not the only competitor for that memory
space. Add-on boards such as network cards, 3270 emulation cards, ESDI
disk controllers, and others can contend for this address space.
Several potential difficulties can arise due to this contention:

1. Lack of Space

The major problem is simply finding at least 64K of contiguous free
space in which to place the page frame. LIM 4.0 does not require a
64K page frame but is almost useless without it. Frequently the
address areas of various adapter cards need to be shuffled about to
open a contiguous 64K page frame. Complicating this process are
such boards as the IBM 3270, which have nonmovable addresses in
most machines.

2. Mapping Conflicts

Most EMMs (such as EMM386.SYS and Windows 3.00 enhanced mode) use a
search algorithm to find unused memory between C000 and DFFF
located in the 384K reserved I/O address space to use as page
frames. Some cards (adapters) do not reserve their address space
until you access the card, so the memory manager can inadvertently
map EMS pages on top of an address the card will request. This can
cause hanging and intermittent operation. This problem is fairly
rare because the page search routine can locate almost all popular
adapters.

In case of problems, the first thing to do is to disable expanded
memory. This will show if a page conflict really is causing the
symptom you are experiencing. If the problem goes away without
expanded memory, the memory manager must be told to exclude the
address the adapter is occupying from consideration as a page
location. The adapter also may have to be moved. You do this
different ways with different memory managers. Consult your memory
manager's documentation for information on how to exclude an
address range.


======================================================================
WINDOWS 3.00 MODES AND MEMORY USAGE
======================================================================
How it works in each mode

This section examines how the three different modes of Windows 3.00
(real, standard, and enhanced) use the different types of memory we
have discussed (conventional memory, the 384K reserved I/O address
space, extended memory, and expanded memory).

REAL MODE WINDOWS 3.00
======================

Real Mode and Conventional Memory
---------------------------------

Windows 3.00 in real mode is similar in most respects to Windows/286
versions 2.x. Real mode Windows 3.00 executes entirely within
conventional memory. It requires 384K of free conventional memory
(393,216 bytes reported by CHKDSK) to start up successfully.

Real Mode and the 384K Reserved I/O Address Space
-------------------------------------------------

Windows 3.00 does not access the 384K reserved I/O address space
directly in real mode. Remember though, if an external EMM is present
(such as EMM386.SYS), the EMM will use areas of the 384K reserved I/O
address space.

NOTE: Windows 3.00 real mode operation is similar in most respects
to Windows/286 versions 2.x. Real mode can use most Windows 2.x
device drivers and runs applications written for Windows 2.x.

Real Mode and Expanded Memory
-----------------------------

SMALL VERSUS LARGE PAGE FRAME MODE

Real mode Windows 3.00 will automatically switch into large page
frame mode when 280K (plus or minus 8K) of free, mappable expanded
memory pages in conventional memory are available after all Windows
code has been loaded. The ending position of Windows code in memory
plus the amount of Windows global memory determine the start of
free expanded memory pages. Global memory is a memory segment that
Windows puts aside to store things that need to be globally
available to all applications, such as printer drivers and fonts.
The point at which the free mappable expanded memory pages begin is
called the EMS line.

ADJUSTING THE EMS LINE

There is no way to set the position of the EMS line explicitly,
because real mode Windows sets it automatically, as discussed
above. However, you can adjust the EMS line position in a manner
relative to its current position with the command line parameters
discussed below.

REAL MODE WINDOWS EXPANDED MEMORY COMMAND-LINE PARAMETERS

The /N Switch

Starting real mode Windows with the /N command-line switch disables
real mode Windows' use of expanded memory for banking of Windows
applications. This effectively eliminates an EMS line.

The /N switch does not disable expanded memory but only real mode
Windows' use of it. Your external EMM will still be present. A page
frame will be established, and applications can still use LIM 3.2
(if a 64K contiguous page frame is present). This means that this
switch is not useful for debugging possible expanded memory page
frame conflicts. The /N switch disables only real mode Windows' use
of expanded memory, not the expanded memory itself. To disable the
expanded memory itself, you must remove the external EMM.

The /L Switch

Starting real mode Windows with the /L+nnn parameter moves the EMS
line up or down the specified amount of kilobytes (rounded to 16K
increments). The command line WIN/L+16 moves the EMS up 16K,
possibly fine-tuning Windows with your system, provided you are
already in large page frame. Do not use the /L-16 parameter to move
the EMS down, as it will infringe on global memory and cause
problems with printing or displaying fonts.

Real mode Windows normally starts in large page frame. Start real
mode Windows with WIN /L+200 (where 200 is simply an arbitrarily
large number) to force real mode Windows to small page frame mode.
There is almost never a practical use for any other positive
parameter.

The /E Switch

The /Ennn parameter gives you the ability to adjust the 280K
default point at which real mode Windows will go into large page
frame mode (see above). Keep in mind that real mode Windows does
not automatically use one mode or the other without a good reason.
Explicitly setting small or large page frame mode, as opposed to
Windows' automatic choice, may cause problems. Windows' automatic
choice is usually the best choice to take.

However, if you want to explicitly set one mode or the other, you
can use this switch. For example, starting real mode Windows with
WIN /E100 causes Windows to go into large page frame mode if only
100K of bankable conventional EMS pages are free after Windows code
initialization (this effectively switches real mode Windows to
large page frame mode). Conversely, starting real mode Windows with
WIN /E600 forces small page frame mode in all circumstances. You
should normally use the /L+200 switch for this purpose.

Real Mode and Extended Memory
-----------------------------

CODE CACHING USING EXTENDED MEMORY

Real mode Windows 3.00 does not access extended memory directly.
However, if extended memory is present and HIMEM.SYS is loaded,
real mode Windows can speed its operation considerably by
performing code caching to extended memory.

All Windows applications are segmented, that is, divided into
segments that have certain attributes. These attributes include
movable attributes, which means that the segment can be moved
around in memory, and discardable attributes, which means that the
segment can be discarded (that is, forgotten about, overwritten,
and reloaded from disk when necessary). The largest portion of a
given Windows application has both the movable and discardable
attributes.

Under real mode Windows, a lot of discarding goes on because real
mode is limited to conventional memory. Windows applications are
frequently 600K or larger, much larger than available free memory
on a 640K machine with real mode Windows loaded. A Windows
application keeps a minimum amount of code loaded in memory; this
is known as its swapsize. As the program executes and you choose
various functions, whenever Windows runs out of memory, it discards
part of the application and overwrites it with new code loaded from
the executable file on the hard disk.

If XMS memory is accessible to Windows 3.00 via HIMEM.SYS, Windows
will effectively discard code to extended memory. Rather than
forgetting about the code segment and overwriting it with new code
from the executable file, Windows copies the code segment to
extended memory. Then, instead of having to reload from the
executable file, Windows can fetch the code from extended memory
when it is required again. This feature speeds up real mode
operation considerably; code caching is not present in Windows/286
versions 2.x. Note that this feature does not replace the Windows
SMARTDrive disk caching utility. SMARTDrive should still be loaded
whenever possible.

USING XMS MEMORY IN DOS APPLICATIONS

DOS applications that use XMS memory can also be run from real mode
Windows if the required amount of XMS memory is specified in the
PIF (Program Information File). One important point about running
such applications is that real mode Windows is already using all of
the available XMS memory for code caching. Therefore, to run a DOS
application PIF that requires XMS memory, you must swap extended
memory to disk. For example, assume your machine has 2048K of
extended memory. You specify in the PIF that your DOS application
requires 1024K of XMS. Real mode Windows is already using all 2
megabytes of extended memory. When you run the DOS application, the
first megabyte of XMS memory is swapped to disk, and the DOS
application is given access to that megabyte. When you alt+tab back
to real mode Windows, the original 1024K of XMS memory is reloaded
from disk. Since this process can be slow, you should not request
any more XMS memory than is absolutely necessary to run your
application.

SWAPPING DOS APPLICATIONS TO EXTENDED MEMORY

Real mode Windows 3.00 can also swap DOS applications to extended
memory. To do this, create a virtual hard disk in extended memory
with the RAMDRIVE.SYS driver. Then, set the swapdisk= line in the
[nonwindowsapp] section of the SYSTEM.INI file to point to the
drive letter that RAMDrive creates. Note that you must have a
RAMDrive that is at least three times larger than the largest DOS
application you want to use. Also, be advised that using extended
memory to create the RAMDrive will reduce real mode Windows'
extended memory code caching ability and make it run more slowly.

Note: Windows/286 versions 2.x have the ability to swap DOS
applications directly to expanded memory. Since expanded memory
is rarely used under Windows 3.00, this capability was removed.
If you want to swap DOS applications to expanded memory, set up
a RAMDrive in expanded memory and swap to the RAMDrive.

RUNNING PROTECTED MODE DOS APPLICATIONS

Windows real mode allows DOS applications that use a DOS extender
technology such as VCPI (Virtual Control Program Interface) to run
in protected mode. Extended memory allocation for such applications
must be made in the PIF.

STANDARD MODE WINDOWS 3.00
==========================
Breaking the 640K barrier on 286 machines

Standard Mode and Conventional Memory
-------------------------------------

When standard mode Windows 3.00 is executed, it adds the amount of
free conventional and extended memory and looks at the total amount as
one contiguous block of memory. Conventional memory has no special
meaning under standard mode, except when running DOS applications.
Running real or standard mode Windows 3.00 has the same DOS
application support, and DOS applications must run within conventional
memory.

Standard Mode and the 384K Reserved I/O Address Space
-----------------------------------------------------

Windows 3.00 does not access the 384K reserved I/O address space
directly in standard mode. Still, if a physical expanded memory board
is present, the board's EMM will use areas of the 384K reserved I/O
address space. If you suspect a 384K reserved I/O address space
conflict is causing a problem, temporarily remove the external EMM for
testing purposes.

Standard Mode and Expanded Memory
---------------------------------

Standard mode Windows 3.00 does not use expanded memory at all. DOS
applications running under standard mode can access expanded memory
only if a physical expanded memory board along with the appropriate
memory manager is present in the machine. Compatible 386 Expanded
Memory Managers such as EMM386.SYS can be loaded to provide expanded
memory outside of Windows. However, 386 Expanded Memory Managers
cannot be used to provide expanded memory to DOS applications running
from standard mode Windows. The 386 Expanded Memory Manager will be
disabled when standard mode loads. See the "Expanded Memory for DOS
Applications" section of this application note for more information on
using EMS with standard mode.

Standard Mode and Extended Memory
---------------------------------

Windows 3.00 standard mode can access extended memory directly. It
adds the free conventional memory and free XMS extended memory. It
then provides the total as memory for Windows applications to use
(minus the memory required by standard mode Windows itself). Standard
mode initially accesses extended memory through the XMS driver
HIMEM.SYS. DOS applications that use XMS memory can also be run from
standard mode Windows. Since standard and real mode Windows both use
the same DOS application support, the same restrictions apply (see the
"Real Mode and Extended Memory" section of this application note).

ENHANCED MODE WINDOWS 3.00
==========================
Entering the world of virtual memory

Enhanced Mode and Conventional Memory
-------------------------------------

Windows 3.00 enhanced mode deals with conventional memory in much the
same way as standard mode. When enhanced mode Windows 3.00 is
executed, it adds the amount of free conventional and extended memory,
but in addition, Windows 3.00 combines a virtual hard drive memory
factor and looks at the total amount as one contiguous block of
memory. Conventional memory has no special meaning under enhanced
mode, except when running DOS applications. Enhanced mode runs DOS
applications by creating virtual DOS machines up to 640K in gross
size.

Each virtual DOS machine inherits the environment that was present
before Windows enhanced mode was executed. This means that every
driver and TSR loaded before you run Windows is present and consumes
memory in every subsequent virtual DOS machine. The net memory
available within virtual DOS machines under enhanced mode is slightly
less than the free memory at the DOS prompt before you start Windows.

Enhanced Mode and the 384K Reserved I/O Address Space
-----------------------------------------------------

Windows/386 versions 2.x use the 384K reserved I/O address space only
to place the expanded memory page frame, and then to a maximum of only
four 16K pages. Windows 3.00 enhanced mode uses the 384K reserved I/O
address space for two purposes: 1) to place DOS protected mode
application program interface (API) translation buffers, and 2) to
place the expanded memory page frame (if required). Frequently, all of
the free pages in the 384K reserved I/O address space are utilized by
enhanced mode.

API TRANSLATION BUFFERS IN THE 384K RESERVED I/O ADDRESS SPACE

Although Windows 3.00 enhanced mode breaks the 640K barrier for
Windows applications, it still runs on top of DOS. The copy of DOS
upon which Windows is running can execute and access data only
within conventional memory. The same restriction applies to network
software or other drivers loaded before enhanced mode Windows.
Enhanced mode allocates buffers in the 384K reserved I/O address
space to translate DOS and network API calls from protected mode to
real mode. Since the 384K reserved I/O address space is within the
first megabyte of address space, it can be accessed by DOS in real
mode. The translation buffers are used as a window through which
applications executing in protected mode can pass information to
and from DOS and the network.

Ideally, there would be enough free space in the 384K reserved I/O
address space to place both the translation buffers and the
expanded memory page frame. Yet on many configurations there isn't
enough room. This means you have to make a choice. Either the
expanded memory page frame can be eliminated or the translation
buffers can be allocated in conventional memory instead of in the
384K reserved I/O address space. If the translation buffers are
allocated in conventional memory, they take up space in every
virtual machine from Windows that you create. You will have less
space in virtual machines to run DOS applications. The translation
buffers can be allocated either in the 384K reserved I/O address
space or in conventional memory, but never half-and-half.

Fortunately, Windows 3.00 enhanced mode provides a method for
specifying your preference. To do this, place the following switch
in the [386ENH] section of the SYSTEM.INI:

ReservePageFrame=Boolean

If ReservePageFrame=true (the default), enhanced mode Windows
allocates the page frame first and the translation buffers second.
This makes it likely that the translation buffers will be forced
into conventional memory but allows you to use expanded memory in
DOS applications. If ReservePageFrame=false, the translation
buffers are allocated first and the page frame second if there is
still room.

This setting gives you the most free memory within virtual
machines, but you may not be able to use expanded memory in DOS
applications. However, remember that Windows applications do not
need expanded memory to function; only DOS applications that can
utilize expanded memory will be affected. One important note: If
you are using the EMM386.SYS driver, translation buffers are always
placed in conventional memory.

PAGE FRAME PLACEMENT IN THE 384K RESERVED I/O ADDRESS SPACE

As noted in the expanded memory discussion earlier in this
document, expanded memory support requires a page frame located in
the 384K reserved I/O address space. With LIM 4.0 expanded memory,
it is not necessary to have a 64K contiguous page frame in this
area. It's not necessary to have a page frame at all in LIM 4.0.
Still, if you want to use expanded memory in your DOS applications,
you must have a 64K contiguous page frame. This is composed of four
contiguous 16K pages in the 384K reserved I/O address space.

On a typical IBM machine there are only eight free 16K pages in the
384K reserved I/O address space (refer to Figure 2). Four
contiguous pages are required for expanded memory support in DOS
applications, leaving only four other free pages. Other cards such
as network adapters and ESDI hard disk controllers also need to
occupy pages in the 384K reserved I/O address space. Frequently the
combination of installed adapters can break up the free area in the
384K reserved I/O address space so there is no 64K contiguous area
in which to place the page frame. In this case, you will not see
any free expanded memory in your DOS applications running under
Windows 3.00 enhanced mode.

If you experience this problem, you may need to rearrange your
adapter memory locations to get expanded memory support for DOS
applications. This is easiest to do on machines using the Micro
Channel Architecture (MCA) or Extended Industry Standard
Architecture (EISA) bus standards. IBM Personal System/2 models 50
and above are equipped with the Micro Channel bus. The PS/2
machines allow you to change adapter memory locations simply by
booting with the PS/2 Reference Disk and choosing Change
Configuration. A similar procedure is available on most EISA bus
machines such as the COMPAQ SYSTEMPRO and HP Vectra 486. Normal
Industry Standard Architecture (ISA) bus machines such as the IBM
AT and COMPAQ 386 may require you to open the case and flip DIP
switches on the cards to change their memory addresses. Use Figure
2 as a handy worksheet when readdressing adapters to open a 64K
page frame.

If you want, you can disable expanded memory support entirely under
Windows 3.00 enhanced mode by adding the NoEMMDriver=yes parameter
in the [386ENH] section of the SYSTEM.INI file.

CONTROLLING ENHANCED MODE 384K RESERVED I/O ADDRESS SPACE MAPPING

In Windows/386 versions 2.x, the WIN.INI parameters EMMExclude= and
EMMInclude= are used to control expanded memory page frame
placement. These parameters are used under Windows 3.00 enhanced
mode to control not only the expanded memory page frame but also
the API translation buffer mapping. Under Windows 3.00 these
switches begin with the letters EMM only for downward compatibility
reasons. They no longer apply only to expanded memory. The
EMMPageFrame= parameter still applies only to the expanded memory
page frame. In Windows 3.00 these switches have been moved from the
WIN.INI file to the [386ENH] section of the SYSTEM.INI. Windows/386
versions 2.x do not use the E000-EFFF area of the 384K reserved I/O
address space unless specifically instructed. Windows 3.00 enhanced
mode will use this segment unless the machine identifies itself as
a PS/2.

To explicitly exclude an area of the 384K reserved I/O address
space from mapping by Windows 3.00 enhanced mode, use the
EMMExclude= statement. The EMMExclude= parameter accepts a four-
digit hexadecimal memory range, such as EMMExclude=E000-EFFF. Since
there is no standard for hardware implementation of the E000-EFFF
area, it is frequently necessary to exclude this range for enhanced
mode to function properly. Most adapter cards are automatically
detected and excluded by Windows 3.00 enhanced mode. If you suspect
a problem with a 384K reserved I/O address space memory conflict,
use EMMExclude=.

There are very few uses for the EMMInclude= statement. Normally
Windows 3.00 enhanced mode automatically uses all free pages in the
384K reserved I/O address space. Likewise, there are few uses for
the EMMPageFrame= statement, since it controls only the expanded
memory page frame and not the translation buffers. The Windows/386
2.x LastEMMSeg= parameter is not used by Windows 3.00.

Enhanced Mode and Expanded Memory
---------------------------------

Windows 3.00 enhanced mode does not use expanded memory itself. It can
create expanded memory for use by DOS applications written to use
expanded memory, such as Lotus 1-2-3. Expanded memory required by a
DOS application can be specified in the Advanced section of the
application's PIF. It is no longer necessary for Windows applications
to use expanded memory because they can now access extended memory
directly. The main issues for expanded memory under Windows 3.00 are
page frame conflicts, as discussed above.

Windows/386 versions 2.x provide large page frame expanded memory only
for the Windows virtual machine. Windows 3.00 enhanced mode provides
large page frame LIM 4.0 expanded memory in all virtual DOS machines.
This is not currently useful for most DOS applications that use
expanded memory. Most DOS applications use only the 64K page frame
itself, not the additional bankable pages in conventional memory that
large page frame LIM 4.0 supplies. However, this feature may be useful
in the future.

A compatible external 386 memory manager such as EMM386.SYS can be
loaded to provide expanded memory for DOS applications running outside
of Windows 3.00 enhanced mode. Note: EMM386.SYS is specifically
designed to work in conjunction with Windows 3.00. This driver is not
needed to have expanded memory available inside of Windows 3.00 and is
actually turned off when Windows 3.00 enhanced mode is run. See the
"Expanded Memory for DOS Applications" section of this application
note for more information.

Enhanced Mode and Extended Memory
---------------------------------

Like standard mode, Windows 3.00 enhanced mode can access extended
memory directly. It adds the free conventional memory and free XMS
extended memory plus a virtual hard drive memory factor. It then
provides the total as memory for Windows applications to use (minus
the memory required by enhanced mode Windows itself). DOS applications
that use XMS memory can also access XMS in virtual machines under
enhanced mode Windows. The XMS memory supplied to DOS applications by
Windows 3.00 enhanced mode can be virtualized.

RUNNING PROTECTED MODE DOS APPLICATIONS

Windows enhanced mode allows DOS applications to run in protected
mode if they are written to use the Microsoft DOS Protected Mode
Interface (DPMI) specification.

NOTE: Enhanced mode uses the XMS to initially load itself and
its drivers into extended memory before starting up. This is why
enhanced mode requires the presence of HIMEM.SYS, the XMS device
driver.

Enhanced Mode and Virtual Memory
--------------------------------

A VIRTUAL MEMORY CONCEPTUAL ANALYSIS

Virtual memory gives you the ability to run more simultaneous
programs than the amount of physical memory installed on your
computer would normally allow. Virtual memory has been widely used
for years in the world of mainframe computers and recently came to
the IBM world with the introduction of the IBM/Microsoft OS/2
operating system, which is based on the 80286 processor. Windows
3.00 enhanced mode goes beyond the world of OS/2 to offer virtual
memory using the special demand paging capabilities of the Intel
80386 processor.

The best thing about virtual memory in Windows 3.00 enhanced mode
is that programs do not need to be written specifically to take
advantage of it. When you start Windows 3.00 enhanced mode and from
the Help menu, choose Help About Program Manager, you will see that
much more memory is available than is installed in your machine.
Windows applications can use this extra memory without being
written specially for it because Windows applications are device
independent. They let Windows handle the memory management and
simply ask Windows for memory allocations. With virtual memory,
Windows applications keep asking for more memory, which Windows
3.00 enhanced mode is now able to deliver. If you have less memory,
the application runs slower; if you have more memory, it runs
faster; but it is almost always able to run.

At any given moment during the execution of a program, some parts
of its code and data are in physical memory; the rest is swapped to
the hard disk. Whenever a reference is made to a memory address, if
the information is currently in physical memory, it is used without
program interruption. If the information isn't in physical memory,
a page fault occurs. The Windows 3.00 enhanced mode virtual memory
manager takes control.

The required code or data is pulled into physical memory from the
hard disk, and if necessary, some other information is swapped out.
Pages are swapped out on a least recently used (LRU) basis. The
page(s) that have not been accessed for the longest time are the
first to be swapped out. All this swapping occurs without notice to
the user, who sees only a little hard disk activity.

Windows 3.00 enhanced mode virtual memory is a demand-paged system.
This means that pages of data are brought into physical memory when
they are referenced. A demand-paged system does not attempt to
predict what pages will be required in the future. The enhanced
mode virtual memory subsystem is implemented by the Windows 3.00
Virtual Memory Manager (VMM) along with the pageswap device. The
VMM maintains the virtual memory page table. The page table lists
which pages are currently in physical memory and which are swapped
to disk. Because Windows 3.00 enhanced mode is a multitasking
environment, the VMM page table also contains a list of which
memory pages belong to which process. When the VMM needs a page
that is not currently in physical memory, it calls the pageswap
device. Pageswap allocates and deallocates virtual memory and maps
pages into and out of physical memory.

Some virtual memory systems rely on program segmentation to do
their work. Windows applications are segmented. However, virtual
memory under Windows 3.00 enhanced mode is not related to the
segmentation of Windows applications. All memory, virtual and
physical, is divided into 4K pages and the system is managed on
this basis. Page mapping starts at 0 kilobytes and works up. There
are two kinds of pages that can be allocated: physical pages and
virtual pages. The amount of physical pages is simply the amount of
physical memory in the machine divided by 4K. In contrast, memory
allocated to an application is made up of virtual pages. At any
given time, a virtual page can be in physical memory or swapped to
the hard disk.

As mentioned above, Windows 3.00 enhanced mode virtual memory
management uses the least recently used (LRU) page replacement
algorithm. The virtual page table contains flags for each page that
indicate whether the page has been "accessed" and if the page is
"dirty." Accessed means that a process has made a reference to the
page since it was originally loaded. Dirty means that a write has
been made to the page since it was loaded. Because a memory write
qualifies as an access, the Dirty attribute implies the Accessed
attribute.

To illustrate, assume Windows 3.00 enhanced mode is out of physical
memory space. A process requests additional memory. Windows has to
decide which page(s) currently in physical memory it should swap to
disk to fulfill the request. This decision is a three-step process:

1. The virtual memory manager scans the page table, looking for
pages that have neither an Accessed nor a Dirty attribute.
During the scanning process, it clears the Accessed attribute
from all the pages.

2. If it can find enough pages meeting the not Accessed/not Dirty
requirement, it fulfills the request. It swaps the pages to disk
and gives the resulting free memory to the process.

3. If it can't find enough pages the first time through, it repeats
the scan. Yet this time through, none of the pages has an
Accessed attribute because it was cleared by the first scan.
Theoretically, therefore, more pages will meet the requirements,
and the request can be fulfilled. If the required pages are
still not found by the second scan, Windows then swaps out the
pages regardless of their attributes.

The benefit of Windows 3.00 enhanced mode virtual memory support is
the ability to run more programs than could be supported by actual
physical memory. The drawbacks are the disk space requirement for
the virtual memory swap file and a decrease in overall execution
speed when swapping is required. However, it's better to be able to
run a program slowly in a virtual memory system than not to be able
to run it at all.

VIRTUAL MEMORY PAGING FILE OPTIONS AND CONTROLS

Windows 3.00 enhanced mode can use one of two types of virtual
memory paging files, or swap files: temporary or permanent. Only
one type of swap file can be used when running Windows 3.00. Do not
attempt to create a swap file on a RAMDisk. Creating a swap file on
a RAMDisk is a self-defeating pursuit -- you would be sacrificing
physical memory to provide a place to create virtual memory to
replace the physical memory you have used to create the RAMDisk.
Windows 3.00 in 386 enhanced mode requires a minimum of
approximately 1.5 megabytes of hard disk space free on the paging
drive to provide virtual memory support with a temporary swap file.

A temporary swap file is simply a normal DOS file created on the
hard disk that can shrink and grow in size as necessary. The
temporary swap file is called WIN386.SWP. It does not have a Hidden
or System attribute and can be deleted at any time you are not
currently running Windows, if necessary. It is normally deleted
automatically when you exit Windows 3.00 enhanced mode. This
temporary swap file is the default swap file that Windows 3.00 uses
and is created automatically when Windows 3.00 is started.

Temporary swap file location and size can be adjusted by inserting
parameters in the [386ENH] section of the SYSTEM.INI file. The
temporary swap file is always created in your Windows 3.00
directory unless you set the PagingDrive= parameter. If the
PagingDrive= parameter is set (for example, PagingDrive=D:), the
swap file will be created in the root directory of the specified
drive. There is no way to specify a subdirectory for the temporary
swap file location. Temporary swap file size is controlled by the
MaxPagingFileSize= parameter. The size of the temporary swap file
can also be limited in a different way by the use of the
MinUserDiskSpace= parameter, which tells enhanced mode to leave the
specified amount of disk space in kilobytes free when creating a
temporary swap file.

A permanent swap file occupies a contiguous section of your hard
disk. Because it is contiguous, using a permanent swap file
moderately improves the speed of the Windows 3.00 virtual memory
system, and its access requires less overhead than a normal DOS
file. The permanent swap file is a hidden file called 386SPART.PAR,
which also has a System attribute. It is always placed in the root
directory. Since the permanent swap file must be contiguous, you
can't create a permanent swap file larger than the largest
contiguous free segment of your hard disk.

Permanent swap files are created and deleted with the Windows 3.00
SWAPFILE.EXE utility program. A SYSTEM.INI parameter is not used to
point to the location of the permanent swap file. Instead, the
Swapfile utility program creates a SPART.PAR file in your Windows
3.00 directory. Windows 3.00 enhanced mode reads the SPART.PAR file
to find out where the permanent swap file is and how large it is.
SPART.PAR is marked read-only to keep you from accidentally
deleting it. If you delete SPART.PAR, Windows will not know about
the permanent swap file. Also you can't delete the permanent swap
file with the Swapfile utility because Swapfile also reads
SPART.PAR.

The Swapfile utility makes DOS calls that cannot be made from
protected mode Windows. Therefore, SWAPFILE.EXE can be run only
from real mode Windows 3.00 to create or delete a permanent swap
file and cannot run with other applications. If the Swapfile
utility program says that the maximum swap file size it can create
is smaller than your free disk space, your hard disk is fragmented.

If you want to create a larger permanent swap file, you must
optimize your hard disk (optimizing is also known as unfragmenting,
or compacting). This must be done with a third-party utility
program such as Bridgeway Publishing FastTrax, Norton Utilities,
Mace Utilities, Golden Bow VOpt, or Central Point PCTools. If you
have already created a permanent swap file, make sure to delete it
using the Swapfile utility program before optimizing your hard
disk. It is not necessary to delete the permanent swap file every
time you optimize your hard disk -- only when you want to increase
the size of the permanent swap file by optimizing, then re-creating
it.

The Swapfile utility program supports only disks that use 512-byte
sectors. If 512-byte sectors are not being used, this indicates a
nonstandard configuration such as a third-party disk partitioning
driver. Swapfile (and Windows 3.00 itself) supports drives with
512-byte sectors that have been partitioned with the DOS FDISK
utility. Never run Swapfile on a drive that uses a partitioning
driver in the CONFIG.SYS, with the exception of COMPAQ's
ENHDISK.SYS. If you receive a message that your swap file is
corrupted, run the Swapfile utility, delete the current swap file,
and create a new one.

PAGING TO NETWORK DRIVES

Paging to a network drive, while certainly possible, is extremely
slow and is not recommended. Only temporary swap files can be used
on network drives. If you want to page to a net drive, the
directory must not have a DOS Read-Only attribute. You must have
Create and Write access to the directory. Note that because they
are not MSNet-Redirector compatible, the root of a Novell network
drive is the root of the server. Do not set the PagingDrive=
parameter to a Novell network drive. If you do so and multiple
users run Windows 3.00 enhanced mode, their computers will hang
because they will overwrite each other's swap files, all with the
same name and all created in the root directory of the server.


======================================================================
WIN.COM AUTOMATIC START-UP PARAMETERS
======================================================================

WIN.COM starts up automatically in the appropriate Windows 3.00
operating mode for your machine and the amount of memory installed.
These modes are real mode (similar to Windows/286 2.x), 286 standard
mode (also known as 286 protected mode), and 386 enhanced mode (also
known as 386 protected mode). However, Windows may be forced into one
of the three modes through the following command-line switches:

Command Line Mode
------------ ----

WIN /R Real

WIN /S or WIN /2 Standard

WIN /3 Enhanced

REAL MODE REQUIREMENTS
======================

The requirements for WIN.COM to automatically start up in real mode
are the following:

* 8088 processor or above

* 384K of free conventional memory (393,216 bytes reported by CHKDSK)

STANDARD MODE REQUIREMENTS
==========================

The requirements for WIN.COM to automatically start up in standard
mode are the following:

* 80286 processor or above

* 192K of free extended memory

* XMS driver loaded (HIMEM.SYS)

ACTUAL STANDARD MODE REQUIREMENTS

Standard mode conventional/extended memory requirements are
mutually dependent and are not fixed. A typical installation
requires a minimum of 128K free at the DOS prompt to run standard
mode, assuming sufficient extended memory is free. Standard mode
requires between 384K and 512K combined conventional and extended
memory to run (approximately).

For example, if only the minimum 192K of extended memory is free,
approximately 322K of conventional memory is required to run
standard mode. However, If available extended memory is increased
to approximately 208K or greater, only 128K of conventional memory
is required. This example is intended to illustrate that memory
requirements are interrelated and variable.

ENHANCED MODE REQUIREMENTS
==========================

The requirements for WIN.COM to automatically start up in enhanced
mode are the following:

* 80386 processor or above

* 1024K of free extended memory

* XMS driver loaded (HIMEM.SYS)

ACTUAL ENHANCED MODE REQUIREMENTS

See the above notes for standard mode regarding the
interrelationship of conventional and extended memory requirements.
A typical installation requires a minimum of 182K free at the DOS
prompt to run enhanced mode, assuming sufficient extended memory is
free. Enhanced mode requires between 580K and 624K combined
conventional and extended memory to run (approximately).

Note that enhanced mode can start up in low memory situations only
because it provides virtual memory support. However, it may be
extremely slow due to the large amount of disk swapping it must
perform.

All numbers are approximate and may vary widely depending on the
configuration (for example, Windows device drivers chosen, DOS
version, display adapter, etc.). 128K of extended memory is
recovered from shadow RAM usage on COMPAQ 386 machines. Memory
requirements take into account memory that can be recovered from
SMARTDrive (down to the minimum cache size specified).


======================================================================
THE FREE SYSTEM RESOURCES PERCENTAGE
======================================================================

The Program Manager and File Manager Help About boxes in Windows 3.00
standard and enhanced modes give percentage figures for Free System
Resources and Free Memory. To understand what the Free System
Resources percentage means, you must understand some of the anatomy of
Windows' internal structure.

The part of Windows that runs Windows applications is made up of three
main segments called KERNEL, GDI (graphics device interface), and
USER. KERNEL loads and executes Windows applications and handles their
memory management. GDI manages graphics and printing. USER controls
user input and output, including the keyboard, mouse, sound driver,
timer, and communications ports. In Windows 2.x these modules are
linked to the files WIN200.BIN and WIN200.OVL by the Setup program, so
you can't see them in the Windows directory. In Windows 3.00, they're
separate and are located in the SYSTEM subdirectory.

Both USER and GDI have storage areas that are limited to 64K in size.
A storage area limited to 64K is known as a local heap. The Free
System Resources percentage reflects the remaining free percentage of
combined USER and GDI local heap space. Although Windows 3.00 allows
you to run a much larger number of simultaneous Windows applications
than any previous Windows version, it is not without limitations. If
you receive an Out of Memory error and the Help About box shows a
large amount of Free Memory, look at the Free System Resources
percentage. Chances are you are low on system resources.

Every window, subwindow, and icon that is created requires GDI local
heap space. It is theoretically possible to exhaust the system
resources with only one application, such as Program Manager, if
enough objects are created by the application.

Another important aspect of Windows application memory management that
is not included in the Free System Resources percentage is the number
of selectors. A selector is a memory pointer that is consumed with
each memory allocation made by a Windows application. Windows 3.00 has
a fixed number of selectors. If a Windows application allocates a very
large number of small data objects, it is possible to run out of
selectors. This will produce an Out of Memory error message.

Writing a Windows application to handle its own data objects more
efficiently can help in this situation. If you experience a chronic
problem with a particular application while few or no other
applications are loaded, contact the application vendor. It is
important that the vendor becomes aware of the problem so the problem
can be corrected if possible. However, please note that this is a
Windows 3.00 limitation, not an application problem. Writing an
application to handle data objects efficiently can reduce, but not
eliminate, the problem.


======================================================================
ENHANCED MODE PERFORMANCE TIPS
======================================================================
Getting the most from your machine

The following suggestions should assist in maximizing the performance
of your Windows 3.00 enhanced mode installation. Many of these
suggestions apply to standard and real modes as well.

1. Use SMARTDrive.

The Microsoft SMARTDrive disk caching driver can produce the
largest single Windows 3.00 performance improvement. Use SMARTDrive
whenever possible. Allocate the largest amount of memory to
SMARTDrive without impairing your ability to run your desired
applications. For basic information on SMARTDrive installation and
operation, refer to the Microsoft Windows User's Guide version 3.0
manual.

2. Keep your hard disk optimized.

A fragmented hard disk greatly impacts Windows' performance,
especially when a temporary swap file and/or SMARTDrive is
installed. Use a hard disk optimizer program on a weekly basis to
keep your disk contiguous.

3. Create a permanent swap file.

Using a permanent swap file improves performance over using a
temporary one. See the "Enhanced Mode and Virtual Memory" section
of this application note for more information on permanent swap
file allocation.

4. Turn off graphics port trapping.

The speed of running DOS applications under enhanced mode can be
noticeably improved by not selecting any of the Monitor Ports
options in the Advanced section of the PIF Editor. The High
Graphics option is on by default to provide the widest range of DOS
application compatibility but is not required for most
applications.

5. Turn off the FileSysChange= option.

Windows 3.00 enhanced mode can monitor disk access by DOS
applications and send directory update messages to the File
Manager. This allows the File Manager to be automatically updated
by changes made to files or directories by DOS applications.
However, it is not a necessity and leaving this option off (the
default) speeds file access by DOS applications. To disable this
feature, set FileSysChange=no in the [386ENH] section of the
SYSTEM.INI file.

6. Turn off the ReservePageFrame= option.

Turn this option off if you do not require expanded memory support
for DOS applications. Turning this option off ensures that you're
getting the most possible memory in virtual machines. To disable
this feature, set ReservePageFrame=no in the [386ENH] section of
the SYSTEM.INI file.

7. Use the right number of DOS buffers.

If you are using SMARTDrive, set the number of DOS disk access
buffers in your CONFIG.SYS file to 15 (that is, BUFFERS=15). Using
a greater number of buffers with SMARTDrive will actually decrease
efficiency. If you are not using SMARTDrive, use BUFFERS=30.

8. Use the lowest common display driver.

Using a display driver with a higher resolution or greater number
of colors results in slower display performance. If you do not
require the extra features of the display driver, use a driver with
less capability. Usually this suggestion applies to display systems
that are VGA compatible but offer an extended mode driver, such as
the Video Seven or 8514. Using the standard VGA driver instead
offers faster display performance but less resolution and/or color
support.

9. Use the proper hard disk interleave.

Frequently, a hard disk is formatted with the wrong interleave at
the dealer or factory. You can use a program such as Gibson
Research's SpinRite to verify that you are using the proper
interleave. Some utilities can correct your interleave without
reformatting the hard disk.


======================================================================
EXPANDED MEMORY FOR DOS APPLICATIONS
======================================================================

UNDER REAL MODE WINDOWS 3.00
============================

Real mode Windows 3.00 and DOS applications can both use the same
external Expanded Memory Manager (EMM). Expanded memory can be
provided either by a physical expanded memory board, or by a 386
Expanded Memory Manager. Common expanded memory boards include the
Intel Above Board and AST RAMpage. Common 386 Expanded Memory Managers
include Microsoft EMM386.SYS (included with the Windows product),
COMPAQ CEMM.EXE (included with COMPAQ 386 machines), Qualitas 386 to
the Max (386MAX.SYS), and Quarterdeck QEMM.SYS.

If a physical expanded memory board is used, you will get the best
performance from real mode Windows by backfilling to provide large
page frame LIM 4.0 support. Some boards do not have the hardware
register support to provide large page frame LIM 4.0 -- only small
page frame (see the "Expanded Memory" section of this application
note). All 386 Expanded Memory Managers provide large page frame LIM
4.0 support.

Remember that DOS applications require LIM 3.2 (a 64K contiguous page
frame) to use expanded memory, but real mode Windows requires LIM 4.0
(does not require a 64K contiguous page frame). If you see expanded
memory in Windows but not in your DOS applications, you probably do
not have a 64K contiguous page frame (LIM 3.2), and you may need to
rearrange adapter locations. Refer to the "Expanded Memory" section of
this application note for more information.

UNDER STANDARD MODE WINDOWS 3.00
================================

As noted in the standard mode section of "Windows 3.00 Modes and
Memory Usage" of this application note, Windows 3.00 standard mode
does not use expanded memory. DOS applications running under standard
mode can use expanded memory only with a physical expanded memory card
such as an Intel Above Board or AST RAMPage. 386 Expanded Memory
Managers cannot be used to provide expanded memory support for DOS
applications running from standard mode. Still, 386-compatible EMMs
can be loaded to provide DOS application expanded memory support
outside of standard mode.

UNDER ENHANCED MODE WINDOWS 3.00
================================

Expanded memory emulation is provided internally for DOS applications
running under enhanced mode. The only requirement is the presence of a
64K contiguous page frame. See the "Enhanced Mode and the 384K
Reserved I/O Address Space" section of this application note for more
information on page frame placement. Expanded memory for DOS
applications can be allocated and/or limited via PIF parameters.

EXTERNAL 386 EXPANDED MEMORY MANAGERS
=====================================

Some 386 Expanded Memory Managers have a special feature that allows
standard or enhanced mode Windows to turn them off when Windows is
run. Memory managers with this capability are EMM386.SYS and CEMM.EXE.
Windows can turn off EMM386.SYS even if expanded memory is in use at
the time. CEMM.EXE requires that no expanded memory be in use when
standard or enhanced mode Windows is run. Other memory managers such
as 386MAX and QEMM cannot be loaded with standard or enhanced mode
Windows.

Some 386 Expanded Memory Managers provide the capability to load DOS
device drivers into free areas of the 384K reserved I/O address space.
This process works correctly under real mode Windows, and if you must
run real mode, this is recommended for best performance. EMM386.SYS
and CEMM.EXE do not provide this capability, but 386MAX.SYS and
QEMM.SYS do.

If you plan to switch back and forth between real mode and standard or
enhanced mode Windows 3.00, we recommend using EMM386.SYS. Neither
standard nor enhanced mode will run with 386MAX or QEMM. Using one of
these memory managers requires you to reboot with a different
CONFIG.SYS and AUTOEXEC.BAT to switch between Windows 3.00 operating
modes. Using EMM386.SYS allows you to run whichever mode you want.


======================================================================
DPMI AND VCPI
======================================================================

SPECIFICATIONS FOR DIFFERENT PURPOSES
=====================================

The DOS Protected Mode Interface (DPMI) was developed by a group of
industry leaders including Borland, Eclipse, IBM, IGC, Intel, Locus,
Lotus, Microsoft, Phar Lap, Quarterdeck, and Rational Systems. Several
members of the DPMI committee were also involved in the creation of
the Virtual Control Program Interface (VCPI). DPMI is primarily a
creation of Microsoft, and VCPI was formulated primarily by Phar Lap
Software.

DOS EXTENDED APPLICATIONS
=========================

DOS extended applications execute code in the protected mode of the
80286 or 80386 processor. Unlike OS/2 applications, DOS extended
applications are launched from standard MS-DOS or PC-DOS. Creating a
DOS extended application requires a method to switch the processor to
protected mode and to allocate extended memory. Until DPMI, there has
been no standard method for DOS extended applications to perform these
tasks plus multitask memory with other applications on 80286
processors. Hundreds of existing applications have been created using
various types of DOS extenders. OS/2 extender applications that do not
already support DPMI will require minor modifications to do so.

COMPARING VCPI TO DPMI
======================

VCPI and DPMI solve two different problems. VCPI provides an interface
between applications using DOS extenders on an 80386 machine, and 386
Expanded Memory Managers. For example, the 386 Expanded Memory
Managers QEMM, 386MAX, and CEMM support the VCPI specification. VCPI
allows applications using DOS extenders to run simultaneously with 386
Expanded Memory Managers on a 386 machine.

However, multitasking operating environments such as Windows 3.00
enhanced mode, OS/2, UNIX 386, and VM386 have memory and protection
models that are not compatible with the VCPI interface. DPMI was
created so these environments can run extended DOS applications.
Additionally, DPMI provides support for 80286-based machines, which
VCPI does not. DPMI has the capability of running DOS extended
applications on a variety of processors and operating environments.


======================================================================
GLOSSARY
======================================================================

386 Expanded Memory A device driver loaded that provides expanded
Manager (EMM) memory on an 80386-based computer without a
physical expanded memory board. 386 Expanded
Memory Managers operate via the 386
processor's hardware capabilities.

386MAX.SYS A 386 Expanded Memory Manager from Qualitas
Corp.

CEMM.EXE A 386 Expanded Memory Manager from COMPAQ.
CEMM is provided with all COMPAQ 386-based
computers. It carries an extension of .EXE
rather than .SYS even though it is installed
in the CONFIG.SYS file like other 386
Expanded Memory Managers.

Conventional Memory The memory in your machine from 0K to 640K.

DPMI The DOS Protected Mode Interface (DOS
extender industry standard). Applications
that use the DPMI specification can run in
protected mode and break the 640K barrier
under standard or enhanced mode Windows 3.00.
The DPMI specification is available from
Intel Corporation.

EMM386.SYS The Microsoft 386 Expanded Memory Manager.
See the Windows 3.00 user's guide for more
information.

EMM Expanded Memory Manager.

EMS Expanded Memory Standard. There are two
Expanded Memory Standards, which are
designated LIM 3.2 and LIM 4.0.

Expanded Memory Manager A device driver that provides an interface to
(EMM) expanded memory. An Expanded Memory Manager,
or EMM, is either specific to a particular
physical expanded memory board, or uses the
386 processor.

Extended Memory Memory in your machine above 1 MB. Extended
memory always starts at 1024K.

Large Page Frame A slang term denoting the presence of
bankable expanded memory pages in
conventional memory. It is usually used to
refer to an amount of bankable pages equal to
or greater than 384K (that is, bankable pages
ranging from 256K to 640K). Note that the
term "large page frame" is a misnomer. The
page frame is actually never any larger than
four 16K pages and is always located in the
384K reserved I/O address space. Additional
bankable pages in conventional memory do not
make the page frame larger; they simply
provide additional bankable pages.

LIM 3.2 The Lotus/Intel/Microsoft expanded memory
standard (EMS) version 3.2. It provides for a
maximum of four 16K bankable pages that must
be contiguous.

LIM 4.0 The Lotus/Intel/Microsoft expanded memory
standard (EMS) version 4.0. It provides for a
maximum of 64 16K bankable pages, which do
not have to be contiguous.

Page Frame An area within the 384K reserved I/O address
space that is designated the expanded memory
page frame. The page frame itself can be a
maximum of four 16K pages.

QEMM386 A 386 Expanded Memory Manager by Quarterdeck
Corp.

Small Page Frame A slang term denoting the presence of

expanded memory that does not place bankable
pages within conventional memory.

VCPI An 80386 memory management standard created
by Phar Lap Software in conjunction with
other software developers.

VM Virtual machine. VM is a protected memory
space created through the hardware capability
of the 386 processor.

Virtual Memory A term stating the combination of
conventional, extended, and hard drive factor
memory.

Virtual Hard Drive The available space on a hard drive partition
Memory Factor that Windows can address as physical memory.

VMM Virtual Memory Manager.

XMS The Microsoft eXtended Memory Specification.
The XMS provides a standard way for real mode
applications to access extended memory. DOS
applications running under Windows 3.00 can
use the XMS to access extended memory. The
XMS document and sample source code is
available from the Microsoft Information
Center at (800) 426-9400 [international
callers should call (206) 882-8661].



 December 14, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)