home *** CD-ROM | disk | FTP | other *** search
-
- CACHE Version 2.2. by Quick and Dirty Software, Inc. Origional logic by
- ----- ----------- Steven Holzer of PC Magazine (8/85)
-
- CACHE establishes disk caches. The default cache is for all PC, XT, and AT
- real (not virtual) drives other than the AT hard disk.
-
- FORMAT: [d:] [path] cache [[size] disk]
-
- [d:] [path] before CACHE to specify drive/path that contains CACHE.COM.
-
- [size] Size of cache in 512-byte sectors. Number must be between 24 and
- 124, or it will be adjusted. Default: 64. CACHE takes less than 256
- bytes, plus 518 bytes per sector.
-
- [disk] Disk to be cached, if single disk cache is being allocated. Default:
- all real disks. But there may be times to avoid cacheing a specific
- disk, or to cache larger than 62K bytes.
-
- CACHE can be invoked more than once to create a larger cache or to set
- individual disk caches for each disk.
-
- Caches are searched in reverse order of allocation. If you are allocating
- more than one cache, allocate the most heavily used cache LAST. If you are
- allocating a general cache, it makes sense to allocate it FIRST in most
- cases, so it becomes a "cache of last resort". The overhead for skipping
- individual caches is small, but the overhead for a search failure is large.
-
- Only single sector reads and writes are cached. Therefore, loading large
- programs will not be affected.
-
- What will be affected: databases with records smaller than 512 bytes, batch
- files, and source files for language processors that scan the input file
- more than once.
-
- The disk file directory and file allocation tables are cached, and always
- resident once read from disk. Other files have their sectors purged if they
- are not frequenly accessed.
-
- When the cache is allocated, its segment location is listed out. The DOS
- DEBUG command can be used to read out data areas of interest, while the
- cache is running. The data areas start at offset 114h. They are each one-
- word (two bytes) long:
-
- offset data
-
- 114 Cache size in sectors
- 116 Total Number of disk I/O's
- 118 Number of cache hits
- 11A Number of free slots in cache
-
- Remember that these numbers are hexadecimal and stored low-order byte first,
- so the default size of 64 is stored as: 40 00
-
- To access this data, first write down the sector address typed out when
- CACHE initializes. Let's say it is 909. Type the following commands:
-
- DEBUG
- d 909:114
- ' (analyze the displayed data)
- q
-
-
- Typically, about half of all disk I/O's result in cache hits. All data in
- cache backed up on disk immediately, so only disk reads assisted by cache.
-
- The cache should be sized so you will not reduce the number of free slots to
- zero the first time you perform your most frequent operation. Size your
- cache by booting up, issuing the CACHE command for a 124-sector buffer,
- performing your "typical" batch file, compile or data base access, running
- DEBUG, determining how much CACHE remains free, and downsizing as required.
-
- If you can't allocate a single large cache that does the job, then create
- caches for heavily used disks.
-
- Place CACHE commands first in your AUTOEXEC.BAT file because CACHE will make
- it run faster. Also, notice that DIR commands run without pausing, and the
- disk will stop running about halfway through the second time it is issued.