From: Wayne Mesard
Subject: SUMMARY: GC and time critical code
Date: 
Message-ID: <22881@bbn.COM>
In article <·····@bbn.COM> I wrote:
> I'm working on a spec for a program that needs to take collect reaction
> time data (from humans).  The program really wants to be written in Lisp
> (as any well conceived program would :-), but I'm not clear about how
> garbage collection will interfere with taking time data.  That is, what
> if the system is doing GC when the subject "presses the stop button"?
> 
> I imagine this problem has been dealt with before.  Is there a way to
> prevent this?  (Forcing a GC right before the critical code isn't a
> guarantee, but I'm willing to entertain arguments that that's good
> enough.)

The replies I received can be briefly summarized as follows.  Thanks
very much to all who responded.  (Especially those whose thank-you notes
got bounced:-( ).

o  Turn it off during response-critical sections.  This, of course,
   causes trouble if you run out of memory, but it should be possible in
   most cases to allocate first and then be careful not to cons (much) when
   the gc is off.  (One example is Gensym--a real-time (factory and
   process control) expert system shell.  They had a booth at AAAI last
   year.)

o  Use a "real-time GC algorithm" that do a little bit of GC with each
   cons, or a little bit at a time.  Specifically:
   Wait for the new releases of common lisp from both Franz and Lucid. 
   They both have ephemeral GC's and thus the time spent doing GC should
   be less noticeable.

-- 
unsigned *Wayne_Mesard();                     ······@BBN.COM
                                              BBN Labs, Cambridge, MA
After all, Sodom wasn't built in a day.