home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!paladin.american.edu!darwin.sura.net!wupost!sdd.hp.com!swrinde!elroy.jpl.nasa.gov!ames!data.nas.nasa.gov!taligent!apple!minow
- From: minow@Apple.COM (Martin Minow)
- Newsgroups: comp.sys.mac.hardware
- Subject: Re: ***** HELP ***** MACINTOSH W/ CACHE ****
- Message-ID: <72395@apple.Apple.COM>
- Date: 15 Sep 92 16:34:18 GMT
- References: <9209141803.AA21935@kiwi.tropix.uucp>
- Organization: Apple Computer Inc., Cupertino, CA
- Lines: 42
-
- In article <9209141803.AA21935@kiwi.tropix.uucp> bng@tropel.gca.com
- (Baldwin Ng) writes:
- >What is "CACHE" or "CACHE CARD"?
- >How will a Macintosh computer's performance differ if
- >there is a CACHE CARD?
-
- A cache or cache card is a hardware extension to the processor that allows
- the cpu and memory to run at different speeds. There are several types
- of caches. Take an instruction cache for example. Suppose the cpu wants
- to execute the instruction at memory address 123. The cache hardware
- first looks in its internal (very fast) memory for that memory value.
- If it's present, it delivers the value to the processor. If not, it reads
- main memory locations 123, 124, 125, and 126 [for example], delivers
- the value at 123 to the processor and remembers (i.e., caches) the others.
- Since it is very likely that the next instruction the processor will execute
- is at location 124, and the value of 124 will still be in the cache, the
- processor + cache combination eliminates a comparitively slow access
- to main memory.
-
- Caches can operate similarly for data, and for memory writes. Writing
- data is a bit tricky, however, since the processor may write word 123
- then immediately read word 123. Here, the cache must deliver the latest
- value of that word, and not an out-of-date value that might be left
- in the cache.
-
- Caches gain some performance by knowing that instruction accesses are
- supposed to be read-only, so it can bypass write-checks for instructions.
- This is a problem for programs that dynamically modify the instruction
- stream. If a program must do this, the program must explicitly inform
- the cache by executing a "cache flush" instruction. (There are similar
- problems for concurrent I/O operations.)
-
- Caches may be built into the cpu hardware or available as add-on boards.
- There is a noticable performance improvement for cpu-bound tasks (I recently
- added a cache board to my Mac-IIci), but your experience will depend
- on the kind of programs you run.
-
- Of course, the above explanation has simplified matters considerably; you
- should read a computer architecture textbook for more information.
-
- Martin Minow
- minow@apple.com
-