386 Motherboards (and cache behavior)

Dick Dunn rcd at ico.isc.com
Sat May 5 10:34:21 AEST 1990


dwc at cbnewsh.ATT.COM (Malaclypse the Elder) writes:

> ...if the cache is a virtual one, then
> process switches will result in cache flushes (unless there
> is a process id tag in the cache).  if the cache is a physical
> one, then you don't have to worry unless there is either a
> process swap, a page replacement, or a process exit.  but in
> this case, you are sharing your 64K cache (or whatever size)
> with other processes.

Caches on 386 systems are, of necessity, physical-address caches:  The
virtual-to-physical mapping happens on-chip; the processor presents a
physical address on the pins.

The case of process exit doesn't matter directly, since the pages are just
freed.  It will matter when a frame (or whatever you want to call it, the
physical-memory container for a page) is reassigned.  Process-swap and
page-replacement also come down to the same thing:  You have to do some-
thing when you reassign physical memory.  This just means that the cache
has to know (or be told) when memory locations are modified.  It knows
about CPU accesses, of course; it's DMA that it has to worry about.

As for sharing the cache, yes, that's an issue.  The interesting questions
have to do with how many active processes you've got, how often you allow
switching among them, and how much active memory you've got in each
process.  Although we lament how programs seem to be growing without bound,
the most active areas in programs still tend to stay small.
-- 
Dick Dunn     rcd at ico.isc.com    uucp: {ncar,nbires}!ico!rcd     (303)449-2870
   ...Lately it occurs to me what a long, strange trip it's been.



More information about the Comp.unix.i386 mailing list