 
[The following article is reprinted, in a manner of speaking,
from the upcoming fall issue of Final Draft.  We thought you 
might find it of interest now.]
 
 
                       THANKS FOR THE MEMORY
  
          The Basics of Extended and Expanded Memory   
 
According to Autodesk product support specialists, the most 
frequently asked questions concern AutoCAD's ability to make use 
of Extended and Expanded Memory.  "What is it?," people ask.  "How 
does AutoCAD use it?"  "How should I set my system up?"  In the 
following article, we'll do our best to answer those questions.
 
I WANT INCREASED SPEED.  HOW DO I GET IT?
One of the slowest operations your PC has to perform involves 
writing information to, and reading information from, a hard disk 
or floppy drive.  The less frequently this process must occur, the 
more quickly your software will run.  How often a program needs to 
read or write information from disk varies.  Spreadsheets 
typically avoid disk accesses by attempting to hold the entire 
spreadsheet in RAM.  Database managers, on the other hand, must 
frequently perform such reads and writes as information is being 
updated or sorted.
 
How about AutoCAD?  Well, AutoCAD users want speed, but they also 
want to be able to edit a drawing of any size, so some compromises 
are called for.  When you're editing a small drawing, much of
AutoCAD's work is done in random-access memory (RAM), without 
requiring any disk storage.  As the size and complexity of the 
drawing increases, temporary files are created automatically to 
hold various types of information about the drawing; portions of 
the drawing are then "paged out" to these files to make room in 
RAM for other portions.  "Paging" information to a file simply 
means writing that information to a file; when that information is 
required again, it must be read back from the file.
 
Here's where Extended or Expanded Memory can be of benefit: If 
AutoCAD sees that you have this additional memory available, it 
sets aside all or a portion of it (this can be controlled by you) 
for use as RAM-based "I/O Page space."  AutoCAD then pages 
information to this memory first, rather than writing it to disk.
Thus, the performance improvement you will enjoy depends on 
various factors: the size of your drawings, how much additional 
memory you are using, the speed of your hard disk, and so on.
 
WHAT EXACTLY IS EXTENDED AND EXPANDED MEMORY?
Extended and Expanded Memory are two quite different ways to make 
use of memory in your computer beyond the one megabyte directly 
addressed by your operating system.  (We're assuming that your 
computer is running under MS-DOS or PC-DOS; this discussion does 
not apply to those running AutoCAD under UNIX or VMS.)  You add 
either type of memory by installing one or more boards designed 
for this purpose in your computer.  To use Expanded Memory you 
also need to install an appropriate piece of software, called a 
device driver.  (AutoCAD provides its own handler for Extended
Memory.)
 
Expanded Memory is intended for 8088/8086-based machines such as 
the IBM PC/XT, though it can also be used in 80286 and 80386-based
machines.  It enables appropriately written software to address
up to 8MB of additional RAM.  This additional memory can be used 
by any program that follows the procedures laid out in the 
Expanded Memory Specification (EMS), a collaborative design by 
Lotus, Intel, and Microsoft.
 
Extended Memory works in a different fashion. The 80286 CPU found 
in machines like the IBM PC/AT can address up to 16mb of RAM 
directly....in theory.  In practice, current versions of MS-DOS 
and PC-DOS do not run in the so-called protected mode required to
address memory above 1MB.
 
To summarize: Expanded Memory can be used by any computer in the
8088/8086/80286 "family," including 80286/80386 machines.  Extended
Memory can only be used by machines in the 80286/80386 class.  
Expanded Memory is implemented within the EMS; memory management 
tasks are handled by an installed driver (typically specified in 
the config.sys file).  Until an operating system is available that 
will directly address memory above the one megabyte level, software 
such as AutoCAD that makes use of Extended Memory must 
provide a mechanism for handling that memory itself (which AutoCAD 
does).
 
AutoCAD can make use of either type of memory (or both!).  On
start-up, AutoCAD will automatically check for the presence of 
Extended Memory and for the presence of an Expanded Memory Manager 
(EMM).  AutoCAD will automatically determine which type you're 
working with (provided the memory has been properly installed), 
and will display the amount available to you on the last lines of 
the STATUS command display.  Thereafter, AutoCAD will page data to 
this memory first.  Once it fills up, AutoCAD will then page to 
disk, as previously.
 
SO WHICH ONE DO I WANT?
Since AutoCAD uses both Extended and Expanded Memory in a similar 
fashion, which one you'll want depends largely on what kind of 
computer you own and what other kinds of software you use.  
 
You can use Expanded Memory in both 8088/8086-based and
80286/80386-based machines; Extended Memory is only available for the
latter.  Just to make matters more interesting, there are a number of
Extended Memory boards which can also be used to implement
Expanded Memory.  The benefit here is that you can use Expanded Memory
for now, then switch to using Extended Memory as developments in the
software industry allow.  Your investment in hardware is not wasted.
 
Since the Expanded Memory Specification was developed in part by Lotus
and Microsoft, it comes as no surprise that applications from those two
companies can make use of Expanded Memory.  Autodesk has implemented its
own handler for Extended Memory; few other programs do so.  As mentioned
above, most developers are waiting on the appearance of an appropriate
operating system for the PC before writing code to make use of Extended
Memory.
 
HOW MUCH EXTENDED/EXPANDED MEMORY DO I NEED?
A beginning estimate can be made by bringing up a new drawing, 
preferably without a menu.  (You do this, of course, before you 
have any Extended/Expanded Memory installed!) Do a ZOOM Extents.  
Now use the STATUS command to check the reading for Free Disk 
Space.  Next, bring up your largest existing drawing with a menu 
loaded, do a ZOOM E again, and then use STATUS again to check the 
free disk space.  The difference between the two figures (up to 
4MB)--plus a bit for your AutoLISP files, if you use large
AutoLISP routines-- should give you a good starting point for the
amount of Extended/Expanded Memory to begin with. Remember to add
any memory you may want to use as a RAM disk.  As noted above,
you can install a RAM disk to use memory above 4MB, or--if you
have 4MB or less of Extended/Expanded Memory--you can use part as
a virtual disk and part as I/O page space.
 
HOW DO I SET IT UP?
All you have to do is have one, the other, or both installed.  AutoCAD
will currently use up to 4MB of Extended/Expanded Memory as additional
I/O page space; additional memory above that amount will not be used,
though you still have the option of using it to implement a virtual
disk (also known as a RAM disk), such as IBM's VDISK.
 
HOW SHOULD I CONFIGURE IT?
Here's one possible configuration: Given 4MB of Extended/Expanded
Memory, configure half of it as a RAM disk, copy ACAD*.* to it,
set ACAD= to the drive letter of the RAM disk, and run AutoCAD
right off the RAM disk.
 
But wait!  Where did this RAM disk stuff come from?  Normally,
every time you call an overlay into AutoCAD a disk access has to
be made.  Using Extended or Expanded Memory as additional I/O
page space has no effect on this requirement, but running AutoCAD
from a RAM disk does.  If the required overlays have been loaded
into a RAM disk at the beginning of the session, you'll get
increased speed, since these overlay loads will occur from the
RAM disk. (For more details on how to configure a RAM disk to
work with AutoCAD, see your Installation and Performance Guide,
Chapter 3).
 
Note that we still have 2MB of Extended/Expanded Memory left that
AutoCAD can use as additional I/O page space.  This should be plenty for
most drawings (assuming a drawing size no greater than
approximately 600kb).
 
THE BOTTOM LINE
Whether you set up your Extended/Expanded Memory as a virtual disk,
Extended I/O space or a combination of the two, the speed improvement
that you'll get from adding additional memory to your system is based
simply on a reduction in the number of physical disk accesses that
would otherwise occur.  The benefits of installing AutoCAD on a RAM disk
depend on the kind of work you do, and thus on how much time--if
any--you spend waiting for an overlay to load.  This is not a
function of drawing size, but of editing style.
 
The benefits of additional I/O page space, on the other hand, are
directly related to drawing size: the larger the drawing, the more often
AutoCAD will need to page information to and from disk as you edit.  The
milliseconds you save on each access can add up to a significant time
savings during the course of a day's work.  If you tend to work on
smaller drawings, however, you won't experience as significant an
improvement--there's less need to page portions of the drawing
out to memory.  It's not necessarily the case, therefore, that more
memory is always better.
 




                                                                              