[gclist] write barrier
boehm.PARC@xerox.com
boehm.PARC@xerox.com
Fri, 8 Mar 1996 11:08:35 PST
"A write barrier is a mechanism for executing some memory management code when
a write to some object takes place ..."
I would propose to generalize this a bit. It's a mechanism for performing some
action in response to every write operation in a certain memory region.
There's a reason I'm being picky again:
I would classify our collector as write-barrier-based. But the only action
that needs to be performed on a write is to keep track of the fact that the
page in question is now dirty. Under an operating system like Solaris, that
bookkeeping is all done within the VM part of the kernel; the garbage collector
doesn't get notified. (For Solaris on X86, it presumably all happens in
hardware.)
The same is presumably true of any other VM-based incremental update
collectors.
This also partially contradicts the argument by Marcin Skubiszewski. It is
however worth pointing out that this isn't necessarily faster than actually
executing GC code on page faults. Last I checked, the dirty bit retrieval code
in Solaris was slow enough to compensate for the reduced overhead on the first
write to a page.
Hans