Presentation is loading. Please wait.

Presentation is loading. Please wait.

Garbage Collecting the World: One Car at a Time Richard L. Hudson, Ron Monison,~ J. Eliot B. Moss, & David S. Munrot Department of Computer Science, University.

Similar presentations


Presentation on theme: "Garbage Collecting the World: One Car at a Time Richard L. Hudson, Ron Monison,~ J. Eliot B. Moss, & David S. Munrot Department of Computer Science, University."— Presentation transcript:

1 Garbage Collecting the World: One Car at a Time 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

2 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?

3 Goals Motivation was to provide garbage collection for distributed systems with the following properties. Safety Completeness Non-disruptiveness Incrementality Scalability Non-blocking

4 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.

5 DMOS Collector (Distributed Mature Object Space)‏ Based on MOS and PMOS garbage collection. Uses trains and cars analogy. Also uses relative ages of trains.

6 Rules 1) Data locally reachable from roots is copied to a younger train. 2) Data locally reachable from younger trains is copies to those trains. (If from multiple trains, any will do.)‏ 3) Data locally reachable from older trains is copied to another car in the current train. 4) Data locally reachable from other cars of the same train is copied to another care of the same train. 5) All remaining data is unreachable and is reclaimed.

7 Rules (handling cycles)‏ 1) If no object in a train is reachable from outside the train, collect the entire train. 2) Data locally reachable from roots is copied to a younger train. 3) Data locally reachable from younger trains is copies to those trains. (If from multiple trains, any will do.)‏ 4) Data locally reachable from older trains is copied to another car in the current train. 5) Data locally reachable from other cars of the same train is copied to another care of the same train. 6) All remaining data is unreachable and is reclaimed.

8 Rules (non-local trains)‏ 1) If no object in a train is reachable from outside the train, collect the entire train. 2) Data locally reachable from roots is copied to a younger train. 3) 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. 4) Data locally reachable from older trains is copied to another car in the current train. 5) Data locally reachable from other cars of the same train is copied to another care of the same train. 6) All remaining data is unreachable and is reclaimed.

9 Example (Step 1)‏

10 Example (Step 2)‏

11 Example (Step 3)‏

12 Example (Step 4)‏

13 Addressing Objects DMOS objects encode logical address and home node. Car numbers are not reused, or reused very slowly.

14 Pointer Tracking Events

15 Node A Sends to Node B a Pointer to o

16 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., but no or, but no. 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.

17 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

18 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  Generate add o' message  Generate remove o message 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'

19 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

20 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]

21 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]

22 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).

23 Two Nodes Leave a Train Ring at the Same Time

24 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

25 Illustration of Correctness of Train Reclamation Algorithm Assuming no new objects are added to the train

26 Unwanted Relative Problem

27 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

28 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.

29 Safety and Completeness Safety  Object substitution  Car / Train reclamation Completeness  Oldest train will eventually be collected

30 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

31 Conclusion DMOS is a new distributed garbage collection algorithm that satisfy all of the following properties:  Safety  Completeness  Non-disruptiveness  Incrementality  Scalability  Non-blocking

32 Future Work Implementation and practical evaluation. Algorithmic performance analysis. Extension to tolerate node and communications failures.

33 Questions?


Download ppt "Garbage Collecting the World: One Car at a Time Richard L. Hudson, Ron Monison,~ J. Eliot B. Moss, & David S. Munrot Department of Computer Science, University."

Similar presentations


Ads by Google