[comp.lang.smalltalk] hedging about Lisp & Caches -- your mileage will vary

wilson@carcoar.Stanford.EDU (Paul Wilson) (02/24/89)

After I posted my Lisp vs. Caches posting, I realized I'd glossed
over some very important details.  (I tried to kill the posting, but
failed.  So here's some hedging.)

I failed to account for the cost of the increased number of flips
and scans of the "remembered set".  (Or whatever you use to remember
pointers from older generations into the newest one.)  Depending
on your strategy for these, the costs could be quite reasonable
or very high.

I think some kind of incremental stack scanning could keep the
flip cost acceptably low.

The remembered sets are harder.  If you use a scan-dirty-pages scheme
like Shaw's (using VM dirty bits), the page scanning cost could be
intolerable.  A more sophisticated system like the Symbolics uses would
be somewhat better.  My own "card marking" implementation would probably
be better still.  (It keeps its own dirty bits, for areas much smaller
than pages.)

Best of all would be the TI Explorer's system, which uses indirection
tables to isolate pointers from each generation to each younger generation.
The tables holding pointers from each generation into the youngest are
probably typically quite small and quickly scanned.

So my current guess is that keeping the youngest generation/level in RAM
is likely to be a win on the Explorer, but likely to be a lose in most
other systems.


On the other hand, it's been suggested that Ungar's estimates of the rate
of scavenging may be pessimistic by as much as a factor of two.  If so,
the difference may help cover the other costs.


I should also point out that there are many variables that could affect
these estimates, for example whether large nonpointer objects are allocated
specially instead of scavenged. 

Given these hedges, any comments?

           -- Paul


Paul R. Wilson                         
Electronic Mind Control Laboratory*       lab ph.: (312) 413-0042
U. of Illin. at C. EECS Dept. (M/C 154)   wilson@carcoar.stanford.edu
Box 4348   Chicago,IL 60680       *(a.k.a. Human-Computer Interaction Lab)
Paul R. Wilson                         
Human-Computer Interaction Laboratory    lab ph.: (312) 413-0042
U. of Ill. at Chi. EECS Dept. (M/C 154) 
Box 4348   Chicago,IL 60680              wilson@carcoar.stanford.edu