Subject: Re: Modernizing Common Lisp
From: (Rob Warnock)
Date: Mon, 10 May 2004 16:53:37 -0500
Newsgroups: comp.lang.lisp
Message-ID: <>
Marcin 'Qrczak' Kowalczyk  <> wrote:
| Either all threads must be stopped for GC (how to ensure that all
| reach a safe point?) or... well, I have no idea how to make a "true"
| multithreaded GC without obtaining a lock for each allocation and setq,
| which would be bad.

1. You can have a per-thread "nursery" (non-moving generation 0) and
   allocate from that without thread locks until full, *then* do a
   "stop-the-world" minor GC.

2. Using a card marking GC, a SETQ software write barrier doesn't need
   locks (that is, provided that the memory system is coherent w.r.t.
   writes at some small level of granularity, preferably bytes, but if
   not, then at least words -- all normal SMP and ccNUMA systems provide
   at least this).

| Another complication: dynamic bindings should be thread-local.

That's true even for user-space "green" threads, and should be considered
a solved problem. [All the major implementations already do that.]


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607