330 likes | 465 Views
Richard L. Hudson, Ron Monison,~ J. Eliot B. Moss, & David S. Munrot Department of Computer Science, University of Massachusetts, Amherst, MA 01003, U.S.A. ’ Email: { hudson, moss} @cs.umass.edu Schoo1 of Mathematical and Computational Sciences,
E N D
Richard L. Hudson, Ron Monison,~ J. Eliot B. Moss, & David S. Munrot Department of Computer Science, University of Massachusetts, Amherst, MA 01003, U.S.A. ’ Email: { hudson, moss} @cs.umass.edu Schoo1 of Mathematical and Computational Sciences, University of St Andrews, North Haugh, St Andrews, Fife, KY16 9SS, Scotland Email: (ron, dave} @dcs.st-and.ac.uk Presented by: Martin Krogel Garbage Collecting the World: One Car at a Time
Outline • Goals • Assumptions • DMOS Collector • Rules • Example • Addressing Objects • Pointer Tracking • Object Substitution Protocol • Car and Train Management • Unwanted Relative Problem • Cleaning up Trains • Safety and Completeness • Related Works • Conclusion • Future Work • Questions?
Goals Motivation was to provide garbage collection for distributed systems with the following properties. • Safety • Completeness • Non-disruptiveness • Incrementality • Scalability • Non-blocking
Assumptions • Nodes have local storage and only use message passing. • Ordered delivery of messages. • Nodes appear to operate correctly. • No bounds on relative computation rates. • Events at a node are totally ordered.
DMOS Collector • (Distributed Mature Object Space) • Based on MOS and PMOS garbage collection. • Uses trains and cars analogy. • Also uses relative ages of trains.
Rules • Data locally reachable from roots is copied to a younger train. • Data locally reachable from younger trains is copies to those trains. (If from multiple trains, any will do.) • Data locally reachable from older trains is copied to another car in the current train. • Data locally reachable from other cars of the same train is copied to another care of the same train. • All remaining data is unreachable and is reclaimed.
Rules (handling cycles) • If no object in a train is reachable from outside the train, collect the entire train. • Data locally reachable from roots is copied to a younger train. • Data locally reachable from younger trains is copies to those trains. (If from multiple trains, any will do.) • Data locally reachable from older trains is copied to another car in the current train. • Data locally reachable from other cars of the same train is copied to another care of the same train. • All remaining data is unreachable and is reclaimed.
Rules (non-local trains) • If no object in a train is reachable from outside the train, collect the entire train. • Data locally reachable from roots is copied to a younger train. • Data locally reachable from younger trains is copies to those trains. (If from multiple trains, any will do.) If the destination train is not represented on this node, then the node should join the train and create a new car in that train. • Data locally reachable from older trains is copied to another car in the current train. • Data locally reachable from other cars of the same train is copied to another care of the same train. • All remaining data is unreachable and is reclaimed.
Addressing Objects • DMOS objects encode logical address and home node. • Car numbers are not reused, or reused very slowly.
Ordering of Events • any(o, Y, E) • Indicates whether Y contains any pointers to o based on information in the given set of events E. • <r, n, o, X, Y>, but no <d, n, o, X, Y> or • <+, n, o, Y>, but no <-, n, o, Y>. • absence(o, E) • True if and only if there are no pointers to o at nodes other than o's home node H. • any(o, X, E) is false for all nodes X other than H.
Pointer Tracking Optimization • Removing the unique numbers from events. • Referring fewer events to H. • Further reducing the detail required at H. • Piggy-backing and compressing messages. • Combining events
Object Substitution Protocol • When o is substituted by o' • H creates KnownNodes(o) list • H sends move message [m, o, o'] to known nodes • X receives move message • X inserts o o' in relocation table • X receives a pointer to o • Generate received o message <r, o, X> • Generate add o' message <+, o', X> • Generate remove o message <-, o, X> • H receives message about o from X • Check KnownNodes(o) • If X is not present, add it and send move message. • If H' H • H sends o' pointer to H' • H forwards manipulation messages to H'
Object Substitution Protocol • Cleaning up the Tables • Check for absence(o, E) • H sends and end of move message [e, o, o'] to X • H removes X from KnownNodes(o) • H removes o o' from relocation table • X removes o o' from relocation table • Multiple Substitutions • Opaque Addressing
Car and Train Management • Solving completeness • Remembered Sets and Sticky Remembered Sets • Basic train management • Identifying • successor(X, n:A) • Logical token passing ring • Joining a ring • X sends join message [join, X, n:A] • X becomes successor of A in ring • Leaving a ring • X sends leave message [leave, X, successor(X, n:A), n:A]
Car and Train Management • Basic train management • Identifying • successor(X, n:A) • Logical token passing ring • Joining a ring • X sends join message [join, X, n:A] • X becomes successor of A in ring • Leaving a ring • X sends leave message [leave, X, successor(X, n:A), n:A]
Car and Train Management • How a node X should respond to a leave message [leave, Y, Z, n:A]. • Case 1: Y = successor(X, n:A), i.e., X is Y's predecessor: X sets successor(X, n:A) to be Z (Y's successor) and sends the message [left, n:A] to Y. • Case 2: Z = X and X is not in the process of leaving the ring: X sends the message [leave, Y, Z, n:A] to successor(X, n:A). • Case 3: Z = X and X is in the process of leaving the ring: X sends a [leave, Y, successor(X, n:A), n:A] message to successor(X, n:A).
Car and Train Management • Train Reclamation (using Token Passing) • Initial state • Starting the token • Receiving the token • Rule 1: External pointers in sticky remembered sets for train • Rule 2: No external pointers, but “changed bit” is true • Rule 3: No external pointers and “changed bit” is false • Special case: If Y receives token with value Y, there are no external pointers to the train, and it can be reclaimed
Illustration of Correctness of Train Reclamation Algorithm • Assuming no new objects are added to the train
Unwanted Relative Problem • Rejected solutions • Disallow moving unwanted relatives into n:A • Delay moving relative • Only reclaim oldest trains • Accepted solution: Epochs (old/new) • When a token is started, all cars are considered old epoch. • Cars added while “changed bit” is false are considered new epoch • Cars added while “changed bit” is false are considered old epoch • If “changed bit” switches from false to true, all cars on train are considered old epoch • “Changed bit” is only set when pointer is detected to old epoch car in the train
Cleaning up Trains • X receives the token for n:A with value X. (Old epoch cars are unreachable). • X deletes old epoch cars • X sends [end-of-epoch, X] message. • Y receives end-of-epoch message and Y X. • Y deletes old epoch cars • Y changes new epoch cars to old epoch cars • Y forwards message • X receives end-of-epoch message. • X restarts token passing algorithm • If train is oldest, there will be no new epoch cars, so the train will be fully collected.
Safety and Completeness • Safety • Object substitution • Car / Train reclamation • Completeness • Oldest train will eventually be collected
Related Works • Migration • Bishop's non-distributed garbage collection algorithm • Reference Counting • Bevan's, and Watson & Watson's weighted reference counting. • Reference listing. • Optimized weighted reference counting with background global tracing. • Tracing • Hughes' global timestamped live object trace • Liskov and Ladin suggest centralized time server • Lang, Queninnec, and Piquer's grouped mark/sweep algorithm. • Ferreira and Shapiro's multiple site segment replication • Maheshwari and Liskov's partitioned garbage collection • Garbage Tracing • Vestal's test decrement of suspected cyclic garbage • Lins & Jones' combining weighted reference counting with mark and sweep from deletion points (not roots). • Maeda et al. And Fuchs' tracing potentially cyclic garbage
Conclusion • DMOS is a new distributed garbage collection algorithm that satisfy all of the following properties: • Safety • Completeness • Non-disruptiveness • Incrementality • Scalability • Non-blocking
Future Work • Implementation and practical evaluation. • Algorithmic performance analysis. • Extension to tolerate node and communications failures.