Return to BSD News archive
Path: sserve!manuel!munnari.oz.au!mips!decwrl!sdd.hp.com!swrinde!gatech!rutgers!ub!acsu.buffalo.edu!ferrick From: ferrick@acsu.buffalo.edu (Patrick K. Ferrick) Newsgroups: comp.unix.bsd Subject: RAM cache strategies Message-ID: <Br6ME7.9LM@acsu.buffalo.edu> Date: 10 Jul 92 16:42:06 GMT Sender: nntp@acsu.buffalo.edu Organization: UB Lines: 55 Nntp-Posting-Host: lictor.acsu.buffalo.edu In the July issue of PC magazine, there was an article discussing, among other things, RAM cache strategies. I'll mention some of the major points in the hope that discussion on the net may help those of us about to upgrade our motherboards to run 386BSD. Aside from the size of the cache itself, two factors are important: - organization - write policy Organization: direct mapped or set-associative ------------ * direct mapped assigns one line of cache memory (16 bytes) to each block, and is apparently much easier to design and build * set-associative assigns multiple lines to each block; typical designs assign either two or four lines per block (two or four-way associative) According to the article, set-associative caches work much better with multi-tasking OSs because multiple processes often reference completely different blocks of memory. A direct mapped cache suffers from "thrashing", or repeated cache misses/rewrites, under similar circumstances. Uncool. Write policy: write through, buffered write, or write back ------------ * write through cache ignores write operations, passing them directly through to main memory * buffered write delays writes to memory until the CPU moves to a non-memory operation. Then buffer contents are written to memory. * write-back handles both reads and writes Again, according to the article write through is the simplest (cheapest, most popular) method. It sounds to me like 386BSD would benefit from a more sophisticated cache scheme, but which one? It would seem that a set-associative, write-back cache (optimum?) would only be found on "top-of-the-line" boards from the big manufacturers. However, I've read the specs on Micronics motherboards, and find them to utilize a direct-mapped, write-through RAM cache. So the questions are: 1. Does anyone have an opinion regarding the optimum 386BSD cache? 2. What board makers offer such a cache? 3. Is anyone using such a motherboard for 386BSD? just wondering, pat