on the fly garbage collection an exercise in cooperation
play

On-the-Fly Garbage Collection: An Exercise in Cooperation Edsget W. - PowerPoint PPT Presentation

On-the-Fly Garbage Collection: An Exercise in Cooperation Edsget W. Dijkstra, Leslie Lamport, A.J. Martin and E.F.M. Steffens Communications of the ACM, 1978 Presented by Almog Benin 25/5/2014 Outline of talk Introduction Problem


  1. The Collector: The Marking Phase 0 1 Root: 1. Shade all roots. 𝑁 is the 𝑗 ← 0 2. nodes count 3. 𝑙 ← 𝑁 in the graph 2 3 4 While 𝑙 > 0 4. 1. < 𝑑 ← color of node # 𝑗 > 5 6 7 2. If 𝑑 == Gray then 1. β€œC1”: <Shade the successors of node # 𝑗 and make node # 𝑗 black> 8 9 10 3. Else 1. 𝑙 ← 𝑙 βˆ’ 1 𝑗 ← 𝑗 + 1 %𝑁 4. 11 12 13 Green simple atomic operations. We will try to break the red. Free list: 14

  2. The Collector: The Marking Phase 0 1 Root: 1. Shade all roots. 𝑁 is the 𝑗 ← 0 2. nodes count 3. 𝑙 ← 𝑁 in the graph 2 3 4 While 𝒍 > 𝟏 4. 1. < 𝒅 ← color of node # 𝒋 > 5 6 7 2. If 𝒅 == Gray then 1. β€œC1”: <Shade the successors of node # 𝒋 and make node # 𝒋 black> 8 9 10 3. Else 1. 𝒍 ← 𝒍 βˆ’ 𝟐 𝒋 ← 𝒋 + 𝟐 %𝑡 4. 11 12 13 Green simple atomic operations. We will try to break the red. Free list: 14

  3. The Collector: The Marking Phase 0 1 Root: 1. Shade all roots. 𝑁 is the 𝑗 ← 0 2. nodes count 3. 𝑙 ← 𝑁 in the graph 2 3 4 While 𝒍 > 𝟏 4. 1. < 𝒅 ← color of node # 𝒋 > 5 6 7 2. If 𝒅 == Gray then 1. β€œC1”: <Shade the successors of node # 𝒋 and make node # 𝒋 black> 8 9 10 3. Else 1. 𝒍 ← 𝒍 βˆ’ 𝟐 𝒋 ← 𝒋 + 𝟐 %𝑡 4. 11 12 13 Green simple atomic operations. We will try to break the red. Free list: 14

  4. The Collector: The Marking Phase 0 1 Root: 1. Shade all roots. 𝑁 is the 𝑗 ← 0 2. nodes count 3. 𝑙 ← 𝑁 in the graph 2 3 4 While 𝒍 > 𝟏 4. 1. < 𝒅 ← color of node # 𝒋 > 5 6 7 2. If 𝒅 == Gray then 1. β€œC1”: <Shade the successors of node # 𝒋 and make node # 𝒋 black> 8 9 10 3. Else 1. 𝒍 ← 𝒍 βˆ’ 𝟐 𝒋 ← 𝒋 + 𝟐 %𝑡 4. 11 12 13 Green simple atomic operations. We will try to break the red. Free list: 14

  5. The Collector: The Marking Phase 0 1 Root: 1. Shade all roots. 𝑁 is the 𝑗 ← 0 2. nodes count 3. 𝑙 ← 𝑁 in the graph 2 3 4 While 𝒍 > 𝟏 4. 1. < 𝒅 ← color of node # 𝒋 > 5 6 7 2. If 𝒅 == Gray then 1. β€œC1”: <Shade the successors of node # 𝒋 and make node # 𝒋 black> 8 9 10 3. Else 1. 𝒍 ← 𝒍 βˆ’ 𝟐 𝒋 ← 𝒋 + 𝟐 %𝑡 4. 11 12 13 Green simple atomic operations. We will try to break the red. Free list: 14

  6. The Collector: The Marking Phase 0 1 Root: 1. Shade all roots. 𝑁 is the 𝑗 ← 0 2. nodes count 3. 𝑙 ← 𝑁 in the graph 2 3 4 While 𝒍 > 𝟏 4. 1. < 𝒅 ← color of node # 𝒋 > 5 6 7 2. If 𝒅 == Gray then 1. β€œC1”: <Shade the successors of node # 𝒋 and make node # 𝒋 black> 8 9 10 3. Else 1. 𝒍 ← 𝒍 βˆ’ 𝟐 𝒋 ← 𝒋 + 𝟐 %𝑡 4. 11 12 13 Green simple atomic operations. We will try to break the red. Free list: 14

  7. The Collector: The Marking Phase 0 1 Root: 1. Shade all roots. 𝑁 is the 𝑗 ← 0 2. nodes count 3. 𝑙 ← 𝑁 in the graph 2 3 4 While 𝑙 > 0 4. 14 1. < 𝑑 ← color of node # 𝑗 > 5 6 7 2. If 𝑑 == Gray then 1. β€œC1”: <Shade the successors of node # 𝑗 and make node # 𝑗 black> 8 9 10 3. Else 1. 𝑙 ← 𝑙 βˆ’ 1 𝑗 ← 𝑗 + 1 %𝑁 4. 11 12 13 Green simple atomic operations. We will try to break the red. Free list: Mutator interleaved!

  8. The Collector: The Marking Phase 0 1 Root: 1. Shade all roots. 𝑁 is the 𝑗 ← 0 2. nodes count 3. 𝑙 ← 𝑁 in the graph 2 3 4 While 𝒍 > 𝟏 4. 14 1. < 𝒅 ← color of node # 𝒋 > 5 6 7 2. If 𝒅 == Gray then 1. β€œC1”: <Shade the successors of node # 𝒋 and make node # 𝒋 black> 8 9 10 3. Else 1. 𝒍 ← 𝒍 βˆ’ 𝟐 𝒋 ← 𝒋 + 𝟐 %𝑡 4. 11 12 13 Green simple atomic operations. We will try to break the red. Free list:

  9. The Collector: The Marking Phase 0 1 Root: 1. Shade all roots. 𝑁 is the 𝑗 ← 0 2. nodes count 3. 𝑙 ← 𝑁 in the graph 2 3 4 While 𝒍 > 𝟏 4. 14 1. < 𝒅 ← color of node # 𝒋 > 5 6 7 2. If 𝒅 == Gray then 1. β€œC1”: <Shade the successors of node # 𝒋 and make node # 𝒋 black> 8 9 10 3. Else 1. 𝒍 ← 𝒍 βˆ’ 𝟐 𝒋 ← 𝒋 + 𝟐 %𝑡 4. 11 12 13 Green simple atomic operations. We will try to break the red. Free list:

  10. The Collector: The Marking Phase 0 1 Root: 1. Shade all roots. 𝑁 is the 𝑗 ← 0 2. nodes count 3. 𝑙 ← 𝑁 in the graph 2 3 4 While 𝒍 > 𝟏 4. 14 1. < 𝒅 ← color of node # 𝒋 > 5 6 7 2. If 𝒅 == Gray then 1. β€œC1”: <Shade the successors of node # 𝒋 and make node # 𝒋 black> 8 9 10 3. Else 1. 𝒍 ← 𝒍 βˆ’ 𝟐 𝒋 ← 𝒋 + 𝟐 %𝑡 4. 11 12 13 Green simple atomic operations. We will try to break the red. Free list:

  11. The Collector: The Marking Phase 0 1 Root: 1. Shade all roots. 𝑁 is the 𝑗 ← 0 2. nodes count 3. 𝑙 ← 𝑁 in the graph 2 3 4 While 𝒍 > 𝟏 4. 14 1. < 𝒅 ← color of node # 𝒋 > 5 6 7 2. If 𝒅 == Gray then 1. β€œC1”: <Shade the successors of node # 𝒋 and make node # 𝒋 black> 8 9 10 3. Else 1. 𝒍 ← 𝒍 βˆ’ 𝟐 𝒋 ← 𝒋 + 𝟐 %𝑡 4. 11 12 13 Green simple atomic operations. We will try to break the red. Free list:

  12. The Collector: The Marking Phase 0 1 Root: 1. Shade all roots. 𝑁 is the 𝑗 ← 0 2. nodes count 3. 𝑙 ← 𝑁 in the graph 2 3 4 While 𝒍 > 𝟏 4. 14 1. < 𝒅 ← color of node # 𝒋 > 5 6 7 2. If 𝒅 == Gray then 1. β€œC1”: <Shade the successors of node # 𝒋 and make node # 𝒋 black> 8 9 10 3. Else 1. 𝒍 ← 𝒍 βˆ’ 𝟐 𝒋 ← 𝒋 + 𝟐 %𝑡 4. 11 12 13 Green simple atomic operations. We will try to break the red. Free list:

  13. The Collector: The Marking Phase 0 1 Root: 1. Shade all roots. 𝑁 is the 𝑗 ← 0 2. nodes count 3. 𝑙 ← 𝑁 in the graph 2 3 4 While 𝒍 > 𝟏 4. 14 1. < 𝒅 ← color of node # 𝒋 > 5 6 7 2. If 𝒅 == Gray then 1. β€œC1”: <Shade the successors of node # 𝒋 and make node # 𝒋 black> 8 9 10 3. Else 1. 𝒍 ← 𝒍 βˆ’ 𝟐 𝒋 ← 𝒋 + 𝟐 %𝑡 4. 11 12 13 Green simple atomic operations. We will try to break the red. Free list:

  14. The Collector: The Marking Phase 0 1 Root: 1. Shade all roots. 𝑁 is the 𝑗 ← 0 2. nodes count 3. 𝑙 ← 𝑁 in the graph 2 3 4 While 𝒍 > 𝟏 4. 14 1. < 𝒅 ← color of node # 𝒋 > 5 6 7 2. If 𝒅 == Gray then 1. β€œC1”: <Shade the successors of node # 𝒋 and make node # 𝒋 black> 8 9 10 3. Else 1. 𝒍 ← 𝒍 βˆ’ 𝟐 𝒋 ← 𝒋 + 𝟐 %𝑡 4. 11 12 13 Green simple atomic operations. We will try to break the red. Free list:

  15. The Collector: The Appending Phase 0 1 Root: 1. While 𝑗 < 𝑁 < 𝑑 ← color of node # 𝑗 > 1. If 𝑑 == WHITE then 2. 2 3 4 14 1. <Append node # 𝑗 to the free list> 5 6 7 Else if 𝑑 == BLACK then 3. <make node # 𝑗 white> 1. 8 9 10 𝑗 + + 4. 11 12 13 Green simple atomic operations. We will try to break the red. Free list:

  16. The Collector: The Appending Phase 0 1 Root: 1. While 𝑗 < 𝑁 < 𝑑 ← color of node # 𝑗 > 1. If 𝑑 == WHITE then 2. 2 3 4 14 1. <Append node # 𝑗 to the free list> 5 6 7 Else if 𝑑 == BLACK then 3. <make node # 𝒋 white> 1. 8 9 10 𝑗 + + 4. 11 12 13 Green simple atomic operations. We will try to break the red. Free list:

  17. The Collector: The Appending Phase 0 1 Root: 1. While 𝑗 < 𝑁 < 𝑑 ← color of node # 𝑗 > 1. If 𝑑 == WHITE then 2. 2 3 4 14 1. <Append node # 𝑗 to the free list> 5 6 7 Else if 𝑑 == BLACK then 3. <make node # 𝒋 white> 1. 8 9 10 𝑗 + + 4. 11 12 13 Green simple atomic operations. We will try to break the red. Free list:

  18. The Collector: The Appending Phase 0 1 Root: 1. While 𝑗 < 𝑁 < 𝑑 ← color of node # 𝑗 > 1. If 𝑑 == WHITE then 2. 2 3 4 14 1. <Append node # 𝑗 to the free list> 5 6 7 Else if 𝑑 == BLACK then 3. <make node # 𝒋 white> 1. 8 9 10 𝑗 + + 4. 11 12 13 Green simple atomic operations. We will try to break the red. Free list:

  19. The Collector: The Appending Phase 0 1 Root: 1. While 𝑗 < 𝑁 < 𝑑 ← color of node # 𝑗 > 1. If 𝑑 == WHITE then 2. 2 3 4 14 1. <Append node # 𝑗 to the free list> 5 6 7 Else if 𝑑 == BLACK then 3. <make node # 𝒋 white> 1. 8 9 10 𝑗 + + 4. 11 12 13 Green simple atomic operations. We will try to break the red. Free list:

  20. The Collector: The Appending Phase 0 1 Root: 1. While 𝑗 < 𝑁 < 𝑑 ← color of node # 𝑗 > 1. If 𝑑 == WHITE then 2. 2 3 4 14 1. <Append node # 𝑗 to the free list> 5 6 7 Else if 𝑑 == BLACK then 3. <make node # 𝒋 white> 1. 8 9 10 𝑗 + + 4. 11 12 13 Green simple atomic operations. We will try to break the red. Free list:

  21. The Collector: The Appending Phase 0 1 Root: 1. While 𝑗 < 𝑁 < 𝑑 ← color of node # 𝑗 > 1. If 𝑑 == WHITE then 2. 2 3 4 14 1. <Append node # 𝒋 to the free list> 6 7 Else if 𝑑 == BLACK then 3. <make node # 𝑗 white> 1. 8 9 10 𝑗 + + 4. 11 12 13 Green simple atomic operations. We will try to break the red. 5 Free list:

  22. The Collector: The Appending Phase 0 1 Root: 1. While 𝑗 < 𝑁 < 𝑑 ← color of node # 𝑗 > 1. If 𝑑 == WHITE then 2. 2 3 4 14 1. <Append node # 𝑗 to the free list> 6 7 Else if 𝑑 == BLACK then 3. <make node # 𝒋 white> 1. 8 9 10 𝑗 + + 4. 11 12 13 Green simple atomic operations. We will try to break the red. 5 Free list:

  23. The Collector: The Appending Phase 0 1 Root: 1. While 𝑗 < 𝑁 < 𝑑 ← color of node # 𝑗 > 1. If 𝑑 == WHITE then 2. 2 3 4 14 1. <Append node # 𝑗 to the free list> 6 7 Else if 𝑑 == BLACK then 3. <make node # 𝑗 white> 1. 8 9 10 𝑗 + + 4. 11 12 13 Green simple atomic operations. We will try to break the red. 5 Free list: Mutator interleaved!

  24. The Collector: The Appending Phase 0 1 Root: 1. While 𝑗 < 𝑁 < 𝑑 ← color of node # 𝑗 > 1. If 𝑑 == WHITE then 2. 2 3 4 14 1. <Append node # 𝑗 to the free list> 6 7 Else if 𝑑 == BLACK then 3. <make node # 𝒋 white> 1. 8 9 10 𝑗 + + 4. 11 12 13 Green simple atomic operations. We will try to break the red. 5 Free list:

  25. The Collector: The Appending Phase 0 1 Root: 1. While 𝑗 < 𝑁 < 𝑑 ← color of node # 𝑗 > 1. If 𝑑 == WHITE then 2. 2 3 4 14 1. <Append node # 𝑗 to the free list> 6 7 Else if 𝑑 == BLACK then 3. <make node # 𝒋 white> 1. 8 9 10 𝑗 + + 4. 11 12 13 Green simple atomic operations. We will try to break the red. 5 Free list:

  26. The Collector: The Appending Phase 0 1 Root: 1. While 𝑗 < 𝑁 < 𝑑 ← color of node # 𝑗 > 1. If 𝑑 == WHITE then 2. 2 3 4 14 1. <Append node # 𝒋 to the free list> 6 7 Else if 𝑑 == BLACK then 3. <make node # 𝑗 white> 1. 8 10 𝑗 + + 4. 11 12 13 Green simple atomic operations. We will try to break the red. 5 9 Free list:

  27. The Collector: The Appending Phase 0 1 Root: 1. While 𝑗 < 𝑁 < 𝑑 ← color of node # 𝑗 > 1. If 𝑑 == WHITE then 2. 2 3 4 14 1. <Append node # 𝒋 to the free list> 6 7 Else if 𝑑 == BLACK then 3. <make node # 𝑗 white> 1. 8 𝑗 + + 4. 11 12 13 Green simple atomic operations. We will try to break the red. 5 9 10 Free list:

  28. The Collector: The Appending Phase 0 1 Root: 1. While 𝑗 < 𝑁 < 𝑑 ← color of node # 𝑗 > 1. If 𝑑 == WHITE then 2. 2 3 4 14 1. <Append node # 𝑗 to the free list> 6 7 Else if 𝑑 == BLACK then 3. <make node # 𝒋 white> 1. 8 𝑗 + + 4. 11 12 13 Green simple atomic operations. We will try to break the red. 5 9 10 Free list:

  29. The Collector: The Appending Phase 0 1 Root: 1. While 𝑗 < 𝑁 < 𝑑 ← color of node # 𝑗 > 1. If 𝑑 == WHITE then 2. 2 3 4 14 1. <Append node # 𝑗 to the free list> 6 7 Else if 𝑑 == BLACK then 3. <make node # 𝒋 white> 1. 8 𝑗 + + 4. 11 12 13 Green simple atomic operations. We will try to break the red. 5 9 10 Free list:

  30. The Collector: The Appending Phase 0 1 Root: 1. While 𝑗 < 𝑁 < 𝑑 ← color of node # 𝑗 > 1. If 𝑑 == WHITE then 2. 2 3 4 14 1. <Append node # 𝑗 to the free list> 6 7 Else if 𝑑 == BLACK then 3. <make node # 𝒋 white> 1. 8 𝑗 + + 4. 11 12 13 Green simple atomic operations. We will try to break the red. 5 9 10 Free list:

  31. The Collector: The Appending Phase 0 1 Root: 1. While 𝑗 < 𝑁 < 𝑑 ← color of node # 𝑗 > 1. If 𝑑 == WHITE then 2. 2 3 4 14 1. <Append node # 𝑗 to the free list> 6 7 Else if 𝑑 == BLACK then 3. <make node # 𝒋 white> 1. 8 𝑗 + + 4. 11 12 13 Green simple atomic operations. We will try to break the red. 5 9 10 Free list:

  32. The Collector: The Marking Phase (2) 0 1 Root: 1. Shade all roots. 𝑗 ← 0 2. 3. 𝑙 ← 𝑁 2 3 4 While 𝑙 > 0 4. 14 1. < 𝑑 ← color of node # 𝑗 > 6 7 2. If 𝑑 == Gray then 1. β€œC1”: <Shade the successors of node # 𝑗 and make node # 𝑗 black> 8 3. Else 1. 𝑙 ← 𝑙 βˆ’ 1 𝑗 ← 𝑗 + 1 %𝑁 4. 11 12 13 Green simple atomic operations. We will try to break the red. 5 9 10 Free list:

  33. The Collector: The Marking Phase (2) 0 1 Root: 1. Shade all roots. 𝑗 ← 0 2. 3. 𝑙 ← 𝑁 2 3 4 While 𝑙 > 0 4. 14 1. < 𝑑 ← color of node # 𝑗 > 6 7 2. If 𝑑 == Gray then 1. β€œC1”: <Shade the successors of node # 𝑗 and make node # 𝑗 black> 8 3. Else 1. 𝑙 ← 𝑙 βˆ’ 1 𝑗 ← 𝑗 + 1 %𝑁 4. 11 12 13 Green simple atomic operations. We will try to break the red. 5 9 10 Free list:

  34. The Collector: The Marking Phase (2) 0 1 Root: 1. Shade all roots. 𝑗 ← 0 2. 3. 𝑙 ← 𝑁 2 3 4 While 𝒍 > 𝟏 4. 14 1. < 𝒅 ← color of node # 𝒋 > 6 7 2. If 𝒅 == Gray then 1. β€œC1”: <Shade the successors of node # 𝒋 and make node # 𝒋 black> 8 3. Else 1. 𝒍 ← 𝒍 βˆ’ 𝟐 𝒋 ← 𝒋 + 𝟐 %𝑡 4. 11 12 13 Green simple atomic operations. We will try to break the red. 5 9 10 Free list:

  35. The Collector: The Appending Phase(2) 0 1 Root: 1. While 𝑗 < 𝑁 < 𝑑 ← color of node # 𝑗 > 1. If 𝑑 == WHITE then 2. 2 3 4 14 1. <Append node # 𝑗 to the free list> 6 7 Else if 𝑑 == BLACK then 3. <make node # 𝑗 white> 1. 8 𝑗 + + 4. 11 12 13 Green simple atomic operations. We will try to break the red. 5 9 10 Free list:

  36. The Collector: The Appending Phase(2) 0 1 Root: 1. While 𝑗 < 𝑁 < 𝑑 ← color of node # 𝑗 > 1. If 𝑑 == WHITE then 2. 2 4 14 1. <Append node # 𝑗 to the free list> 6 7 Else if 𝑑 == BLACK then 3. <make node # 𝑗 white> 1. 8 𝑗 + + 4. 11 12 13 Green simple atomic operations. We will try to break the red. 5 9 10 Free list: 3

  37. Proof for Correction Criteria 2 β€’ Reminder for CC2: β€œAppending a garbage node to the free list is the collector’s only modification of the shape of data structure”. β€’ The marking phase doesn’t change the data structure. β€’ Prove the rest by showing that the following invariant holds after the marking phase completes: – β€œA white node with a number β‰₯ 𝑗 is garbage”

  38. Proof for Correction Criteria 2 – cont ’ β€’ For the first iteration ( 𝑗 = 0 ), this derives from the following observations: β€’ The marking phase terminates when there is no gray node. β€’ The absence of gray nodes is stable once reached. β€’ At the end of the appending phase, there is no black nodes.

  39. Proof for Correction Criteria 2 – cont ’ β€’ For the other iterations ( 𝑗 > 0 ), this derives from the following observations: – There are 2 ways to violate the invariance: β€’ Making a non-garbage node white. β€’ Making a (white) garbage node into non-garbage. – The mutator β€’ doesn’t convert nodes to white. β€’ don’t deal with to white garbage nodes. – The collector β€’ For the 𝑗 -th iteration, only the 𝑗 -th node may change the color.

  40. Proof for Correction Criteria 1 β€’ Reminder for CC1: β€œEvery garbage node is eventually appended to the free list”. β€’ First we need to prove that both phases terminates correctly. – The marking phase terminates because the quantity 𝒍 + 𝑡 βˆ— 𝒀 , where π‘Œ is non-black nodes, decreases by at least 1 for each iteration. – The appending phase terminate obviously, and the mutator cannot change the color of the nodes.

  41. Proof for Correction Criteria 1 – cont ’ β€’ At the beginning of the appending phase, the nodes can be partitioned into 3 sets: – The set of reachable nodes β€’ They are black – The set of white garbage nodes β€’ Will be appended to the free list in the first appending phase to come – The set of black garbage node β€’ Will be appended to the free list in the next appending phase to come

  42. THE SECOND COARSE-GRAINED SOLUTION

  43. The BUGGY Proposal β€’ An attempt to break M1 into 2 atomic operations: – <Redirect an outgoing edge of a reachable node towards an already reachable one> – <Shade the new target> β€’ Shading must be the first in order to keep P1! β€’ A bug was found by Stenning & Woodger.

  44. The BUGGY Proposal - Demo 0 Root: β€’ An attempt to break M1 into 2 atomic 1 2 operations: – <Redirect an outgoing edge of a reachable Free list: 3 node towards an already reachable one> – <Shade the new target> β€’ Shading must be the first in order to keep P1!

  45. The BUGGY Proposal - Demo 0 Root: β€’ An attempt to break M1 into 2 atomic 1 2 operations: – <Redirect an outgoing edge of a reachable Free list: 3 node towards an already reachable one> – <Shade the new target> β€’ Shading must be the Mutator first in order to keep P1!

  46. The BUGGY Proposal - Demo 0 Root: β€’ An attempt to break M1 into 2 atomic 1 2 operations: – <Redirect an outgoing edge of a reachable Free list: 3 node towards an already reachable one> – <Shade the new target> β€’ Shading must be the Collector – Marking Phase first in order to keep P1!

  47. The BUGGY Proposal - Demo 0 Root: β€’ An attempt to break M1 into 2 atomic 1 2 operations: – <Redirect an outgoing edge of a reachable Free list: 3 node towards an already reachable one> – <Shade the new target> β€’ Shading must be the Collector – Appending Phase first in order to keep P1!

  48. The BUGGY Proposal - Demo 0 Root: β€’ An attempt to break M1 into 2 atomic 1 2 operations: – <Redirect an outgoing edge of a reachable Free list: 3 node towards an already reachable one> – <Shade the new target> β€’ Shading must be the Collector – Marking Phase first in order to keep P1!

  49. The BUGGY Proposal - Demo 0 Root: β€’ An attempt to break M1 into 2 atomic 1 2 operations: – <Redirect an outgoing edge of a reachable Free list: 3 node towards an already reachable one> – <Shade the new target> β€’ Shading must be the Mutator first in order to keep P1!

  50. The BUGGY Proposal - Demo 0 Root: β€’ An attempt to break M1 into 2 atomic 1 2 operations: – <Redirect an outgoing edge of a reachable Free list: 3 node towards an already reachable one> – <Shade the new target> β€’ Shading must be the Mutator first in order to keep P1!

  51. The BUGGY Proposal - Demo 0 Root: β€’ An attempt to break M1 into 2 atomic 1 2 operations: – <Redirect an outgoing edge of a reachable Free list: 3 node towards an already reachable one> – <Shade the new target> β€’ Shading must be the Collector – Marking Phase first in order to keep P1!

  52. The BUGGY Proposal - Demo 0 Root: β€’ An attempt to break M1 into 2 atomic 2 operations: – <Redirect an outgoing edge of a reachable 1 Free list: 3 node towards an already reachable one> A Reachable Node in The Free List! – <Shade the new target> β€’ Shading must be the Collector – Appending Phase first in order to keep P1!

  53. The BUGGY Proposal - Reply 0 Root: β€’ An attempt to break M1 into 2 atomic 1 2 operations: – <Redirect an outgoing edge of a reachable Free list: 3 node towards an already reachable one> – <Shade the new target> β€’ Shading must be the first in order to keep P1!

  54. The BUGGY Proposal - Reply 0 Root: β€’ An attempt to break M1 into 2 atomic 1 2 operations: – <Redirect an outgoing edge of a reachable Free list: 3 node towards an already reachable one> – <Shade the new target> β€’ Shading must be the Mutator first in order to keep P1!

  55. The BUGGY Proposal - Reply 0 Root: β€’ An attempt to break M1 into 2 atomic 1 2 operations: – <Redirect an outgoing edge of a reachable Free list: 3 node towards an already reachable one> – <Shade the new target> β€’ Shading must be the Collector – Marking Phase first in order to keep P1!

  56. The BUGGY Proposal - Reply 0 Root: β€’ An attempt to break M1 into 2 atomic 1 2 operations: – <Redirect an outgoing edge of a reachable Free list: 3 node towards an already reachable one> – <Shade the new target> β€’ Shading must be the Collector – Appending Phase first in order to keep P1!

  57. The BUGGY Proposal - Reply 0 Root: β€’ An attempt to break M1 into 2 atomic 1 2 operations: – <Redirect an outgoing edge of a reachable Free list: 3 node towards an already reachable one> – <Shade the new target> β€’ Shading must be the Collector – Marking Phase first in order to keep P1!

  58. The BUGGY Proposal - Reply 0 Root: β€’ An attempt to break M1 into 2 atomic 1 2 operations: – <Redirect an outgoing edge of a reachable Free list: 3 node towards an already reachable one> P1 is now violated!!! – <Shade the new target> β€’ Shading must be the Mutator first in order to keep P1!

  59. The BUGGY Proposal - Reply 0 Root: β€’ An attempt to break M1 into 2 atomic 1 2 operations: – <Redirect an outgoing edge of a reachable Free list: 3 node towards an already reachable one> P1 is now violated!!! – <Shade the new target> β€’ Shading must be the Mutator first in order to keep P1!

  60. The BUGGY Proposal - Reply 0 Root: β€’ An attempt to break M1 into 2 atomic 1 2 operations: – <Redirect an outgoing edge of a reachable Free list: 3 node towards an already reachable one> P1 is now violated!!! – <Shade the new target> β€’ Shading must be the Collector – Marking Phase first in order to keep P1!

  61. The BUGGY Proposal - Reply 0 Root: β€’ An attempt to break M1 into 2 atomic 2 operations: – <Redirect an outgoing edge of a reachable 1 Free list: 3 node towards an already reachable one> P1 is now violated!!! – <Shade the new target> β€’ Shading must be the Collector – Appending Phase first in order to keep P1!

  62. The BUGGY Proposal - Reply 0 Root: β€’ An attempt to break M1 into 2 atomic 2 operations: – <Redirect an outgoing The new idea – replacing the edge of a reachable 1 Free list: 3 node towards an already invariant P1 by weaker invariants. reachable one> P1 is now violated!!! – <Shade the new target> β€’ Shading must be the Collector – Appending Phase first in order to keep P1!

  63. New Invariant: P2 0 1 Root: β€’ Propagation path: A path of consisting solely 2 3 4 of edges with white targets, and starting 5 6 7 from a gray node. β€’ P2: β€œFor each white 8 9 10 reachable node, there exists a propagation 11 12 13 path leading to it” Free list: 14

  64. New Invariant: P3 β€’ P3: β€œOnly the last edge placed by the mutator may lead from a black node to a white one”

  65. The New Algorithm 0 1 β€’ The collector remains Root: the same! β€’ The mutator’s new 2 3 4 operation is the 5 6 7 following M2: – <Shade the target of the 8 9 10 previously redirected edge, and redirect an outgoing edge of a 11 12 13 reachable node towards a reachable node> Free list: 14

  66. The New Algorithm 0 1 β€’ The collector remains Root: the same! β€’ The mutator’s new 2 3 4 14 operation is the 5 6 7 following M2: – <Shade the target of the 8 9 10 previously redirected edge, and redirect an outgoing edge of a 11 12 13 reachable node towards a reachable node> Free list: Mutator interleaved!

Recommend


More recommend