distributed garbage collection for general graphs basic
play

Distributed Garbage Collection for General Graphs Basic Approaches - PowerPoint PPT Presentation

Distributed Garbage Collection for General Graphs Basic Approaches to Garbage Collection The Brownbridge Collector SWP Collector


  1. Distributed Garbage Collection for General Graphs

  2. Basic Approaches to Garbage Collection ● ○ ○ ● ○ ○ ● ○

  3. The Brownbridge Collector ● ● ○ ○ ● ●

  4. SWP Collector ● ● ● ● ○ ○ ○ ●

  5. Distributed Garbage Collection, The Problem... ● ● ● ○ ○ ○ ● ● ●

  6. Distributed Garbage Collection: Prior Work ● ● ● ●

  7. Introducing the SWPR Collection Algorithm ● ● ● ● ● ● ● ● ●

  8. SWP Collector, an Example Starting The graph S strong S edge is S S S removed S S W W W W W W

  9. SWP Collector, an Example Phantomization Phantomization spreads occurs P P P P P S S W S S S W

  10. SWP Collector, an Example … and spreads a These nodes final time P have strong P edges at the P P end P P P P S S S S

  11. SWP Collector, an Example And so we rebuild Rebuilding their outgoing propagates, too S S edges W S W S P W S S S S And we’re done!

  12. SWP Collector: A Similar Example Starting graph S S W W W S S P W S S P S As before, when we pull a strong edge away, the node toggles and phantomizes.

  13. SWP Collector: A Similar Example P P S S P P P P P S P P Phantomization spreads to the last node. Phantomization spreads, All nodes phantomized. The initial node causing another node to toggle. has all incoming phantom edges.

  14. SWP Collector: A Similar Example P S S S P P S P P P P P ? We cannot rebuild the We can, however, “recover” from one graph from the initial of the other nodes in the graph node. because it has a strong edge.

  15. SWP Collector: A Similar Example The Phases of Collection: ● Phantomization ● Build - If the initiator has a strong edge ● Recover - If the initiator does not have a S strong edge. Recover can lead to building. S S W ● Delete - If Recover fails. W W The recovery spreads, and all the edges of the graph are rebuilt.

  16. SWP Collector, Collecting a Simple Cycle S P P P W P S S P Phantomization A simple Remove the Everything is spreads cycle incoming edge, phantomized. Convert incoming Recovery fails. edge and The cycle is phantomize. garbage.

  17. SWP Collector: One Last Example This kind of graph stabilizes quickly! S S S S S S S S S S S W S S P S S S W S S S S S

  18. The Multi-Collection Algorithm ● ○ ○ ● ● ●

  19. Does it work? ● ● ○ ○ ○ ○ ○ ● ●

  20. Details ● ● ● ● → ● ●

  21. Performance

  22. Performance

  23. Performance

  24. Thanks!

  25. Appendix

  26. Collecting With SWPR Reference counts are written like this: [2,1,0], it means strong count=2, weak count=1, phantom count=0. Weights are written like this (2/3), it means weight=2, max weight=3. [1,0,0] (3/2) [1,1,0] (2/3) [1,0,0] [1,0,0] (3/2) (1/2)

  27. Collecting With SWPR We now delete one of the edges. The central node now has strong count=0, and weak count=1. This violates our requirement that all nodes have strong support. [1,0,0] (3/2) [1,1,0] (2/3) [1,0,0] [1,0,0] (3/2) (1/2)

  28. Collecting With SWPR The central node toggles, increasing its weight so that its weak edges become strong. It now phantomizes, sending phantomize messages along its outgoing edges. It sets its wait count to 3. The node will take no further action until wait=0. This central node is called the “initiator” and it coordintes the collection. [1,0,0] [1,0,0] (3/2) (4/3) wait=3 Phantomize [1,0,0] [1,0,0] (3/2) (1/2)

  29. Collecting With SWPR When phantomize reaches the node on the right, its strong edge is converted to phantom. Because it loses strong support, it, too, phantomizes. Note that it remembers the node it must send Return to after phantomization with a parent edge (dashed arrow). All nodes have storage for a single parent edge. [1,0,0] [1,0,0] (3/2) (4/3) wait=3 Phantomize [0,0,1] (3/4) [1,0,0] wait=1 (1/2)

  30. Collecting With SWPR Eventually, a return message comes back to the node on the right. [1,0,0] [1,0,0] (3/2) (4/3) wait=3 Return [0,0,1] (3/4) [1,0,0] wait=1 (1/2)

  31. Collecting With SWPR It’s wait count is now zero, so it sends return to its parent and unsets the parent edge. [1,0,0] [1,0,0] (3/2) (4/3) wait=3 [0,0,1] Return (3/4) [1,0,0] wait=0 (1/2)

  32. Collecting With SWPR The wait count on the central node drops to 2. That’s not zero, so it doesn’t do anything. [1,0,0] [1,0,0] (3/2) (4/3) wait=2 [0,0,1] (3/4) [1,0,0] wait=0 (1/2)

  33. Collecting With SWPR Finally, the other return messages come back. Return [1,0,0] [1,0,0] (3/2) (4/3) wait=2 [0,0,1] (3/4) [1,0,0] wait=0 (1/2)

  34. Collecting With SWPR The wait count is now zero, so an action can be taken... [1,0,0] [1,0,0] (3/2) (4/3) wait=0 [0,0,1] (3/4) [1,0,0] wait=0 (1/2)

  35. Collecting With SWPR Because our strong count is positive, the next action is to build, i.e. to clear the phantomized state. Note that this increases the wait count back to 3. [1,0,0] [1,0,0] (3/2) (4/3) Build wait=3 [0,0,1] (3/4) [1,0,0] wait=0 (1/2)

  36. Collecting With SWPR The node on the right now has a weight of 5 and a max weight of 4. Accordingly, it sets its strong count to 1, its phantom count to zero, and propagates the build message. [1,0,0] [1,0,0] (3/2) (4/3) wait=3 Build [1,0,0] (5/4) [1,0,0] wait=1 (1/2)

  37. Collecting With SWPR The build message returns. [1,0,0] [1,0,0] (3/2) (4/3) wait=3 Return [1,0,0] (5/4) [1,0,0] wait=1 (1/2)

  38. Collecting With SWPR The node on the right now has a wait of 0, so it sends return. When the central node receives it, its wait will be zero, and the collector will be done. [1,0,0] [1,0,0] (3/2) (4/3) Return wait=3 [1,0,0] (5/4) [1,0,0] wait=0 (1/2)

  39. Collecting With SWPR A quiet state is achieved. [1,0,0] [1,0,0] (3/2) (4/3) wait=0 [1,0,0] (5/4) [1,0,0] wait=0 (1/2)

  40. The Phantomization Process ● A possible set of parent edges for a Phantomizing graph is pictured at left. ● The Initiator node (Node I) does not have a parent edge I ● There is only one outgoing parent edge per node ● Connects all nodes in the Phantomizing graph with edges back to the initiator ● Parent edge cannot form a cycle

  41. Another Example...

  42. Collecting With SWPR Reference counts are written like this: [2,1,0], it means strong count=2, weak count=1, phantom count=0. Weights are written like this (2/3), it means weight=2, max weight=3. [1,1,0] [1,1,0] (3/5) (3/5) [1,1,0] [1,0,0] (1/3) (4/3) [1,0,0] [1,0,0] [1,0,0] [1,0,0] Phantomize (5/4) (5/4) (2/1) (2/1)

  43. Collecting With SWPR [1,1,0] [1,0,0] (3/5) (4/3) wait=1 Phantomize [1,1,0] [1,0,0] (3/5) [0,0,1] [1,0,0] (4/3) (2/1) (5/4) wait=1 wait=1 [1,0,0] [1,0,0] Phantomize (5/4) (2/1)

  44. Collecting With SWPR Phantomize [1,0,1] [1,1,0] (6/5) [1,0,0] [1,0,0] (3/5) wait=1 (4/3) (4/3) wait=1 wait=1 Phantomize [0,0,1] [0,0,1] [1,0,0] [1,0,0] (2/1) (2/1) (5/4) (5/4) wait=1 wait=1

  45. Collecting With SWPR Phantomize Return [1,0,1] [1,0,1] (6/5) (6/5) [1,0,0] [0,0,1] wait=1 wait=1 (4/3) (4/3) wait=1 wait=1 [0,0,1] [0,0,1] [1,0,0] [1,0,0] (2/1) (2/1) (5/4) (5/4) wait=1 wait=1

  46. Collecting With SWPR Return [1,0,1] [1,0,1] (6/5) (6/5) [0,0,1] [0,0,1] wait=1 (4/3) (4/3) wait=1 wait=1 Return [0,0,1] [0,0,1] [1,0,0] [1,0,0] (2/1) (2/1) (5/4) (5/4) wait=1 wait=1

  47. Collecting With SWPR [1,0,1] [1,0,1] (6/5) (6/5) [0,0,1] [0,0,1] (4/3) (4/3) wait=1 wait=1 Return Return [0,0,1] [0,0,1] [1,0,0] [1,0,0] (2/1) (2/1) (5/4) (5/4) wait=1

  48. Collecting With SWPR [1,0,1] [1,0,1] (6/5) (6/5) [0,0,1] [0,0,1] (4/3) (4/3) wait=1 wait=1 Recover Return [0,0,1] [0,0,1] [1,0,0] [1,0,0] (2/1) (2/1) (5/4) (5/4)

  49. Collecting With SWPR [1,0,1] [1,0,1] (6/5) (6/5) [0,0,1] [0,0,1] (4/3) (4/3) wait=1 wait=1 Recover Recover [0,0,1] [0,0,1] [1,0,0] [1,0,0] (2/1) (2/1) (5/4) (5/4) wait=1

  50. Collecting With SWPR Recover [1,0,1] [1,0,1] (6/5) (6/5) [0,0,1] [0,0,1] wait=1 (4/3) (4/3) wait=1 wait=1 Recover [0,0,1] [0,0,1] [1,0,0] [1,0,0] (2/1) (2/1) (5/4) (5/4) wait=1 wait=1

  51. Collecting With SWPR Build Return [1,0,1] [1,0,1] (6/5) (6/5) [0,0,1] [1,0,0] wait=1 wait=1 (4/3) (7/6) wait=1 wait=1 [0,0,1] [0,0,1] [1,0,0] [1,0,0] (2/1) (2/1) (5/4) (5/4) wait=1 wait=1

  52. Collecting With SWPR Return [1,0,1] [1,0,1] (6/5) (6/5) [1,0,0] [1,0,0] wait=1 (7/6) (7/6) wait=1 wait=1 Return [0,0,1] [0,0,1] [1,0,0] [1,0,0] (2/1) (2/1) (5/4) (5/4) wait=1 wait=1

  53. Collecting With SWPR [1,0,1] [1,0,1] (6/5) (6/5) [1,0,0] [1,0,0] (7/6) (7/6) wait=1 wait=1 Return Return [0,0,1] [0,0,1] [1,0,0] [1,0,0] (2/1) (2/1) (5/4) (5/4) wait=1 wait=1

  54. Collecting With SWPR [1,0,1] [1,0,1] (6/5) (6/5) [1,0,0] [1,0,0] (7/6) (7/6) wait=1 wait=1 Return Build [0,0,1] [0,0,1] [1,0,0] [1,0,0] (2/1) (2/1) (5/4) (5/4)

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend