Linux and GC

David Gadbois gadbois@cyc.com
Tue, 12 May 1998 16:43:54 -0500


   From: "Henry G. Baker" <hbaker@netcom.com>
   Date: Tue, 12 May 1998 13:53:00 -0700 (PDT)

   You might look at H. Boehm's PLDI (??) paper on using mapping
   hardware.  I may have mentioned it, but this particular idea isn't
   mine, if I understand you correctly.

I think the cool thing about the fork() idea is that it, in effect,
provides a read barrier "for free."  Otherwise, you'd have to do it by
hand on every pointer dereference or set up memory protections.  The
latter is inordinately expensive in UNIX because of the
mprotect()/SIGSEGV handling overhead.  One of Zorn's papers has some
surprising numbers on this.

Given the relatively low communication bandwidth between the child and
the parent, the fork() trick would only make sense for mark-and-sweep
collectors.  It would also be handy for implementing the "stop the
world" functionality needed in the Boehm-Weiser collector in the
presence of threads.

Of course, a real Lisp OS would have cheap ways to fiddle with memory
protections and take protection traps, so there would be no need for
such UNIXy kludges.

--David Gadbois