[gclist] destructors considered necessary

Marc Shapiro shapiro@prof.inria.fr
Fri, 5 Apr 1996 17:58:43 +0200


In a recent mail to gclist, I pointed out that although distributed GC is
often cited as a useful example of the good use of destructors, in fact the
use of weak pointers and a periodic daemon has equivalent functionality and is
more robust.

Well, I was wrong.  I forgot an important feature of my own protocol.  A big
problem with distributed GC is races between delete and creation messages.  In
our protocol we avoid races using timestamps.  Considering two processes A and
B, A can receive from B only messages with timestamp greater than
threshold_A[B].  This threshold is set to the highest timestamp of all DELETED
stubs in A pointing to B.  The destructor procedure for stubs increases the
threshold.

Actually, it turns out that the precise value of the threshold is not
important.  (Simply, the stub timestamp is "optimal" in some sense: under this
value A loses messages; over this value B cannot collect garbage from A.)  So
it seems possible to make the protocol work even without a destructor; it
would still be correct but sub-optimal.

                                                        Marc