Presented by Peter Douglass
Transcribed by Jeffrey Palm
If the collecter is looking atA / \ O C \ B
B, then stops and the
mutator adds the B -C link
and deletes the A -C link we get
the graph: So, if the collecter has moved toA / O C \ / B
A it will conclude
that C is garbage, which is not true. So the Dijkstra and Lamport
propose the following algorithm based on a coloring system (black, gray, and
white) with the following two invariants:
Before any link is made, the target was be made at least gray. "At least gray" here means that if the collector is making a node black, and the mutator tries to make it gray, we make it black; otherwise we make it gray.This algorithm is actually wrong because the link operations are not atomic with the "make at least gray" operation.
cdr,car, ... as well as eq so that
pointers could be properly compared. This was accomplished using forwarding
pointers and pointer chasing.
This method weas relatively efficient and didn't involve locks.*----------------* | new black | *----------------* | free | *----------------* | gray unscanned | *----------------* | black scanned | *----------------*