runtime: simplify mark termination and eliminate mark 2 (original) (raw)

The garbage collector currently uses a racy and complex algorithm to enter mark termination, which has wide-ranging consequences for the complexity of the mark termination implementation. I propose replacing it with a race-free distributed termination detection-like algorithm. This should open the door to several significant simplifications of the garbage collector algorithm.

The design doc can be viewed here.

/cc @RLH