home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Phoenix CD 2.0
/
Phoenix_CD.cdr
/
11a
/
emscache.zip
/
EMMCACHE.DOC
< prev
Wrap
Text File
|
1986-07-13
|
8KB
|
141 lines
EXPANDED MEMORY DISK CACHE 1.00
1. Introduction.
EMMCACHE.COM is a program designed to cache IBM-XT hard disks in LIM
expanded memory; it will not cache floppies, nor will it cache in normal
memory. It has been tested on an IBM-PC with an IBM 10-meg hard disk system,
and an AST RAMpage board managed by AST's REMM.SYS Version 2.08. It should
work with any system which has a LIM-spec board and software, a disk system
which is IBM-XT-compatible at the ROM-BIOS level, and NO OTHER STORAGE
DEVICES. If your system does not clearly fit this description --- in
particular, if you have a hard disk system which exceeds the 32-meg DOS limit,
or if you have any removable-media storage devices other than standard
floppies --- you should NOT use this program without reading the Technical
Notes section below.
2. Installation.
The cache can be installed by typing
EMMCACHE [max [min]]
at the DOS prompt, where the optional parameters 'max' and 'min' are the
maximum and minimum number of expanded memory pages you wish to use for the
cache; if no parameter is specified, the default is to use all available
expanded memory. The cache program installs itself as a terminate-and-stay-
resident program which uses up to 64K of normal memory. Specifically, the
program requires approximately 3K plus 256 bytes per expanded memory page
used. Thus a 1-meg cache uses about 19K of normal memory and, if you have
more than one expanded memory board, a cache of nearly 4 meg should be
possible. The present version of EMMCACHE.COM has no provision for
uninstalling itself. However, the public domain TSR utilities MARK.COM and
RELEASE.COM do correctly uninstall it.
3. Operational Notes.
As you use EMMCACHE.COM, you may find that the cache doesn't always
contain everything that you think it should. There are two reasons why such
behavior may be consistent with correct operation of the program. First, the
program was designed to cache only on read, i.e., if a sector is not already
in the cache, writing it will not move it into the cache. So if, for example,
you use an editor to create and save a new file, that file will not normally
be cached immediately. Second, the program organizes cached sectors into
groups, and its response to any error or unexpected condition is to purge
either the group involved or the entire cache. So a disk error may result in
seemingly unrelated sectors being purged from the cache, even though the
sector causing the error may get into the cache on a retry. Similarly, since
the cache program treats any request except read, write or status as an
"unexpected condition", any such request will cause the entire cache to be
purged.
4. Technical Notes.
EMMCACHE.COM works by intercepting calls to interrupt 13h. It makes no
assumptions whatsoever about the disk hardware. It does however assume that
the calls it intercepts can be interpreted as calls to the IBM-XT hard disk
BIOS. In particular it assumes that
(a) if the high bit of register DL is 1 then a device with non-removable
media is being addressed,
(b) register AL contains the number of 512-byte sectors to be transferred,
(c) registers ES:BX point to the start of the memory buffer,
(d) registers CX and DX uniquely specify the first sector to be
transferred and, for a multi-sector transfer, successive sectors are
similarly specified by repeatedly incrementing register CL.
If your system contains storage devices other than standard XT hard disks and
floppies, you must determine whether their operation involves interrupt 13h
and, if so, whether the above assumptions are valid. If they're not, the use
of EMMCACHE.COM will produce disastrous results.
The present version of EMMCACHE.COM expects requests for only three
subfunctions of interrupt 13h: status request (AH = 1), read sectors (AH = 2),
and write sectors (AH = 3). A request for any other subfunction is handled by
purging the cache and passing the request on.
5. Performance.
EMMCACHE.COM performs like an automatic RAM-disk. Files load faster from
the cache than they do from a hard disk, but the difference is much less
dramatic than the difference between a RAM-disk and a floppy. As a simple
measure of relative performance, I configured Borland's Turbo Lightning
spelling checker with a null RAM dictionary and used it to check a standard
page of text. Without EMMCACHE.COM it took 41.5 seconds; with the cache
installed it took 35.5 seconds the first time and 31.0 seconds thereafter. In
order to compare EMMCACHE.COM's performance with that of a RAM-disk, I
repeated the test with Lightning's dictionary on an expanded memory RAM-disk
created by using IBM's VDISK.SYS together with AST's REX.SYS. The results
surprised me so much that I repeated the test with a variety of RAM-disk
configurations.
| Bytes per Sector | Sectors per Cluster | Time in Seconds |
|--------------------|-----------------------|-------------------|
| 256 | 1 | 67.5 |
|--------------------|-----------------------|-------------------|
| 512 | 1 | 47.7 |
|--------------------|-----------------------|-------------------|
| 512 | 2 | 38.1 |
|--------------------|-----------------------|-------------------|
| 512 | 4 | 33.5 |
|--------------------|-----------------------|-------------------|
| 512 | 8 | 31.0 |
|--------------------|-----------------------|-------------------|
Apparently the performance of some applications is very sensitive to the size
of the minimum disk allocation unit, and the use of an improperly configured
RAM-disk may result in a substantial performance degradation. Note that the
larger cluster sizes were obtained by patching VDISK.SYS; I couldn't discover
any other way to obtain them.
6. Copyright, Disclaimer, etc.
If a program can be copyrighted simply by inserting a copyright notice in
the code, then EMMCACHE.COM is copyrighted by the author. However, the author
hereby grants permission for anyone to use this program, and to distribute it
freely in unmodified form along with this documentation for no more than a
nominal media charge.
The author makes no claim about this program except that (a) it isn't a
Trojan Horse, (b) he has done everything he could think of to ensure that it
is error-free, and (c) he's using it on his own system. If you use
EMMCACHE.COM, you do so with the understanding that even the most carefully
written program may contain subtle errors that appear only after prolonged
use, that any terminate-and-stay-resident program is subject to corruption by
other ill-behaved programs, and that either of these eventualities could
result in loss of data stored on your disks.
I'm interested in any comments and suggestions you have to make. I'm
particularly interested in reports of the use of EMMCACHE.COM on systems
different from my own. Please address any correspondence to
Frank Lozier
Department of Mathematics
The Cleveland State University
Euclid Avenue at East 24th Street
Cleveland, Ohio 44115