home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / cachechk.zip / CACHECHK.INS < prev   
Text File  |  1995-06-20  |  4KB  |  77 lines

  1.    Cache test (c) 1995 Graham C. Norris
  2.  
  3.    -*-
  4.  
  5.    This program is copyright. It is not public domain. You may freely use it but
  6.    may not disassemble or modify it. By running the program you assume all
  7.    responsibility for any adverse result arising. The program is not warranteed,
  8.    guarenteed, or in any other way assured to produce the correct result. Use at
  9.    your own risk.
  10.  
  11.    -*-
  12.  
  13.    This program is intended to determine how much memory cache is present in
  14.    a system. It is also intended to determine whether the cache is write-back
  15.    or write-through.
  16.  
  17.    Only cache sizes known (by me) to be used are tested. These are 1K, 8K, 16K,
  18.    32K, 64K, 128K, 256K, 512K and 1M. The program will erroneously report that
  19.    a machine which has no cache has 1M because all tested memory will be the
  20.    same speed, and appear to be cached. A cache line size of 16 bytes is
  21.    assumed.
  22.  
  23.    The reason this program was written was because of the discovery that at
  24.    least one motherboard supplier has found a way of selling defective cache
  25.    without it being noticable. The motherboard in question had what appeared to
  26.    be 256K of 15-ns cache. Removing the "Removing this label will void the
  27.    warranty" label showed that all the chips whose speed was visible were 15ns,
  28.    but those which weren't were 20ns. Rip-off number one.
  29.  
  30.    When the cache was moved to another motherboard, it would not work. Half of
  31.    it was found to be defective: it would not work on any motherboard, or in the
  32.    first bank on the original motherboard. A different BIOS on the original
  33.    motherboard showed 128K of cache: the original BIOS still reported 256K. Rip-
  34.    off number two. Ripped-off twice in one purchase!
  35.  
  36.    Why write this for OS/2, not DOS? First, I am no archaeologist, second I need
  37.    to work with up to 1M memory at a time. The program should be run from an
  38.    OS/2 command line either after booting from a floppy, or Alt-F1,C under Warp.
  39.    If any other threads are active the results will be wrong.
  40.  
  41.    -*-
  42.  
  43.    The program requires OS/2 2.0 or higher and is a non-PM application. It takes
  44.    no parameters and generates about 55 lines of output. I suggest you use
  45.    MODE CO80,60 before you run it. The output of the program may be piped to a
  46.    file.
  47.  
  48.    On a fast system with at least 256K cache the test will take less than five
  49.    minutes. If you disable the on-chip cache even a fast Pentium will take about
  50.    an hour to complete the test. A 20MHz 486 with all cache disabled could take
  51.    several hours. A DX2-80 takes about 3 minutes, a DX2-50 about 6, both with
  52.    write-back level two caching.
  53.  
  54.    In case you don't know what level one or level two caches are, level one
  55.    cache (L1) is the on-chip cache found in 486 and Pentium processors. Level
  56.    two cache (L2) is the extra cache found on a motherboard. L1 is 8K on most
  57.    486 processors and L2 is frequently 256K. Pentiums have a split 8K data and
  58.    8K instruction cache; this program only measures the data cache. There are
  59.    variations such as the 1K cache on Cyrix 486SLC processors and 16K on Intel
  60.    486DX4 processors. 386's don't have on-board cache so any external cache is
  61.    L1 cache and there is no L2.
  62.  
  63.    -*-
  64.  
  65.    If you have any constructive comments I would like to hear them, especially
  66.    if the test gives you a result you regard as incorrect. I reserve the right
  67.    to ignore you however.
  68.  
  69.    -*-
  70.  
  71.    Graham C. Norris. norrisg@ibm.net
  72.  
  73.    -*-
  74.  
  75.    All names are trademarks of their respective owners.
  76.  
  77.