[gclist] A problem with the Baker treadmill.

Paul R. Wilson wilson@cs.utexas.edu
Mon, 13 Jan 1997 11:59:21 -0600


>From majordom@iecc.com Mon Jan 13 11:35:40 1997
>To: gclist@iecc.com
>From: Charles Fiterman <cef@geodesic.com>
>Subject: [gclist] A problem with the Baker treadmill.
>Precedence: bulk
>Reply-To: gclist@iecc.com
>Errors-to: owner-gclist@iecc.com
>
>I was updating our Treadmill collector to work in a
>multi threaded environment when the problem with
>this kind of write barrier struck me hard.

Depending on how you do your threading, and whether
you're supporting true multiprocessing, you might
want to pick your write barrier carefully.

We do our own threading in RScheme, and only switch
threads at safe points.  We have no write barrier
synch problems, because we know that a thread switch
can't occur during a write barrier operation---only
at calls or backward branches.

For a system without safe points, or when supporting
true multiprocessing, you might want to use a snapshot
write barrier rather than a Dijkstra- or Steele-style
write barrier.

A snapshot write barrier only has to append the overwritten
value to a log (list or whatever), so you can have a log
per thread or a log per processor.