[gclist] Re: PPC & GC, or GC and threads

David Gadbois gadbois@cyc.com
Thu, 22 Jan 1998 16:35:39 -0600

   From: Stuart Yeates <Stuart.Yeates@trimble.co.nz>
   Date: Fri, 23 Jan 1998 11:04:48 +1300

   John R Levine wrote:

   > Correct me if I'm missing something, but it's my impression that
   > you're in trouble on any architecture if you combine GC and
   > preempted threads.  It's not just a problem on PPC and other
   > chips without direct addressing.

   I think the problem is better stated as "much of the compiler
   optimization research to-date has made a subtly different set of
   assumptions than is made in a conservatively garbage collected

   There would appear to be no reason why optimizing compilers
   couldn't be built to preserve the invariant that there always be a
   (complete) pointer to every block of live memory.

The problem here is that we don't control both the horizontal and the
vertical.  If the folks writing GCs could impose this invariant on the
code generators, then it would be only a short step to adding enough
additional constraints so that they could do a precise GC.  The space
of applicability for conservative GCs is the one between the
happenstance of current code generation techniques and the lack of
time/ability/desire/control/whatever that prevents the implementation
of a precise GC.

It just so happens that current code generation techniques are
friendly enough to conservative GC approaches that we can argue about
whether it makes engineering sense to use a CGC.  That's not the case
with most thread implementations these days, insofar as control over
interruptibility and its interaction with code generation goes.

This is not to say that it would not be a good thing if code
generators would preserve the invariant.

--David Gadbois