home *** CD-ROM | disk | FTP | other *** search
/ Phoenix CD 2.0 / Phoenix_CD.cdr / 11a / emscache.zip / EMMCACHE.DOC < prev   
Text File  |  1986-07-13  |  8KB  |  141 lines

  1.                         EXPANDED MEMORY DISK CACHE 1.00
  2.  
  3. 1. Introduction.
  4.  
  5.      EMMCACHE.COM is a program designed to cache IBM-XT hard disks in LIM 
  6. expanded memory; it will not cache floppies, nor will it cache in normal 
  7. memory.  It has been tested on an IBM-PC with an IBM 10-meg hard disk system, 
  8. and an AST RAMpage board managed by AST's REMM.SYS Version 2.08.  It should 
  9. work with any system which has a LIM-spec board and software, a disk system 
  10. which is IBM-XT-compatible at the ROM-BIOS level, and NO OTHER STORAGE 
  11. DEVICES.  If your system does not clearly fit this description --- in 
  12. particular, if you have a hard disk system which exceeds the 32-meg DOS limit, 
  13. or if you have any removable-media storage devices other than standard 
  14. floppies --- you should NOT use this program without reading the Technical 
  15. Notes section below. 
  16.  
  17. 2. Installation.
  18.  
  19.      The cache can be installed by typing
  20.  
  21.                           EMMCACHE [max [min]]
  22.  
  23. at the DOS prompt, where the optional parameters 'max' and 'min' are the 
  24. maximum and minimum number of expanded memory pages you wish to use for the 
  25. cache; if no parameter is specified, the default is to use all available 
  26. expanded memory.  The cache program installs itself as a terminate-and-stay-
  27. resident program which uses up to 64K of normal memory.  Specifically, the 
  28. program requires approximately 3K plus 256 bytes per expanded memory page 
  29. used.  Thus a 1-meg cache uses about 19K of normal memory and, if you have 
  30. more than one expanded memory board, a cache of nearly 4 meg should be 
  31. possible.  The present version of EMMCACHE.COM has no provision for 
  32. uninstalling itself.  However, the public domain TSR utilities MARK.COM and 
  33. RELEASE.COM do correctly uninstall it. 
  34.  
  35. 3. Operational Notes.
  36.  
  37.      As you use EMMCACHE.COM, you may find that the cache doesn't always 
  38. contain everything that you think it should.  There are two reasons why such 
  39. behavior may be consistent with correct operation of the program.  First, the 
  40. program was designed to cache only on read, i.e., if a sector is not already 
  41. in the cache, writing it will not move it into the cache.  So if, for example, 
  42. you use an editor to create and save a new file, that file will not normally 
  43. be cached immediately.  Second, the program organizes cached sectors into 
  44. groups, and its response to any error or unexpected condition is to purge 
  45. either the group involved or the entire cache.  So a disk error may result in 
  46. seemingly unrelated sectors being purged from the cache, even though the 
  47. sector causing the error may get into the cache on a retry.  Similarly, since 
  48. the cache program treats any request except read, write or status as an 
  49. "unexpected condition", any such request will cause the entire cache to be 
  50. purged. 
  51.  
  52. 4. Technical Notes.
  53.  
  54.      EMMCACHE.COM works by intercepting calls to interrupt 13h.  It makes no 
  55. assumptions whatsoever about the disk hardware.  It does however assume that 
  56. the calls it intercepts can be interpreted as calls to the IBM-XT hard disk 
  57. BIOS.  In particular it assumes that 
  58.  
  59.      (a) if the high bit of register DL is 1 then a device with non-removable 
  60.          media is being addressed,
  61.  
  62.      (b) register AL contains the number of 512-byte sectors to be transferred,
  63.  
  64.      (c) registers ES:BX point to the start of the memory buffer,
  65.  
  66.      (d) registers CX and DX uniquely specify the first sector to be 
  67.          transferred and, for a multi-sector transfer, successive sectors are 
  68.          similarly specified by repeatedly incrementing register CL.
  69.  
  70. If your system contains storage devices other than standard XT hard disks and 
  71. floppies, you must determine whether their operation involves interrupt 13h 
  72. and, if so, whether the above assumptions are valid.  If they're not, the use 
  73. of EMMCACHE.COM will produce disastrous results. 
  74.  
  75.      The present version of EMMCACHE.COM expects requests for only three 
  76. subfunctions of interrupt 13h: status request (AH = 1), read sectors (AH = 2), 
  77. and write sectors (AH = 3).  A request for any other subfunction is handled by 
  78. purging the cache and passing the request on. 
  79.  
  80. 5. Performance.
  81.  
  82.      EMMCACHE.COM performs like an automatic RAM-disk.  Files load faster from 
  83. the cache than they do from a hard disk, but the difference is much less 
  84. dramatic than the difference between a RAM-disk and a floppy.  As a simple 
  85. measure of relative performance, I configured Borland's Turbo Lightning 
  86. spelling checker with a null RAM dictionary and used it to check a standard 
  87. page of text.  Without EMMCACHE.COM it took 41.5 seconds; with the cache 
  88. installed it took 35.5 seconds the first time and 31.0 seconds thereafter.  In 
  89. order to compare EMMCACHE.COM's performance with that of a RAM-disk, I 
  90. repeated the test with Lightning's dictionary on an expanded memory RAM-disk 
  91. created by using IBM's VDISK.SYS together with AST's REX.SYS.  The results 
  92. surprised me so much that I repeated the test with a variety of RAM-disk 
  93. configurations. 
  94.  
  95.      |  Bytes per Sector  |  Sectors per Cluster  |  Time in Seconds  |
  96.      |--------------------|-----------------------|-------------------|
  97.      |        256         |           1           |       67.5        |
  98.      |--------------------|-----------------------|-------------------|
  99.      |        512         |           1           |       47.7        |
  100.      |--------------------|-----------------------|-------------------|
  101.      |        512         |           2           |       38.1        |
  102.      |--------------------|-----------------------|-------------------|
  103.      |        512         |           4           |       33.5        |
  104.      |--------------------|-----------------------|-------------------|
  105.      |        512         |           8           |       31.0        |
  106.      |--------------------|-----------------------|-------------------|
  107.  
  108. Apparently the performance of some applications is very sensitive to the size 
  109. of the minimum disk allocation unit, and the use of an improperly configured 
  110. RAM-disk may result in a substantial performance degradation.  Note that the 
  111. larger cluster sizes were obtained by patching VDISK.SYS; I couldn't discover 
  112. any other way to obtain them. 
  113.  
  114. 6. Copyright, Disclaimer, etc.
  115.  
  116.      If a program can be copyrighted simply by inserting a copyright notice in 
  117. the code, then EMMCACHE.COM is copyrighted by the author.  However, the author 
  118. hereby grants permission for anyone to use this program, and to distribute it 
  119. freely in unmodified form along with this documentation for no more than a 
  120. nominal media charge. 
  121.  
  122.      The author makes no claim about this program except that (a) it isn't a 
  123. Trojan Horse, (b) he has done everything he could think of to ensure that it 
  124. is error-free, and (c) he's using it on his own system.  If you use 
  125. EMMCACHE.COM, you do so with the understanding that even the most carefully 
  126. written program may contain subtle errors that appear only after prolonged 
  127. use, that any terminate-and-stay-resident program is subject to corruption by 
  128. other ill-behaved programs, and that either of these eventualities could 
  129. result in loss of data stored on your disks. 
  130.  
  131.      I'm interested in any comments and suggestions you have to make.  I'm 
  132. particularly interested in reports of the use of EMMCACHE.COM on systems 
  133. different from my own.  Please address any correspondence to 
  134.  
  135.                      Frank Lozier
  136.                      Department of Mathematics
  137.                      The Cleveland State University
  138.                      Euclid Avenue at East 24th Street
  139.                      Cleveland, Ohio 44115
  140.  
  141.