Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fast Garbage Collection without a Long Wait Steve Blackburn – Kathryn McKinley Presented by: Na Meng Ulterior Reference Counting:

Similar presentations


Presentation on theme: "Fast Garbage Collection without a Long Wait Steve Blackburn – Kathryn McKinley Presented by: Na Meng Ulterior Reference Counting:"— Presentation transcript:

1 Fast Garbage Collection without a Long Wait Steve Blackburn – Kathryn McKinley Presented by: Na Meng Ulterior Reference Counting:

2 Throughput vs. Responsiveness  Goal  Better responsiveness (shorter pause time)  Better throughput (running time) GC mutator CPU Utilization (  time  ) mutatorpoor responsiveness maximum pause 2 Thanks to Dimitris for his presentation in 2009.

3  Copying  GC time proportional to survivors  Ideal for collecting high mortality young objects  Reference Counting  GC time proportional to mutations  Ideal for collecting objects with low mutation 3  Young objects  High mortality  High mutation  Old objects  Low mortality  Low mutation Ulterior Reference Counting

4 Basic Idea 4 Thanks to Curtis for his presentation recently. Young nursery space RC-mature space 1 2 0 1

5 Ulterior Reference Counting 5 Non-RC to RC Expensive RC tracking Expensive cycle detection Cyclic structures Pause time Old-new pointer Cycle detection Bounded nursery RC buffering Integrate Write Barrier Parameter Control

6 Cycle Detection 6 2 23 22 Root Buffer Live Data 111 1. Process Decrements 2. Mark Gray 3. Scan 4. Collect White 1 1 2 1 1 0 1 1 1 0 1 0 1 0 1 0 1 0 Cycle Buffer 5. Calculate external in-degree 3 2 3 1 3 0 3 0 3 0 1 1 3 3 3 2 1 0 1 0 3 2 1 1 1 0 1 0 6. If 0, GC/decrement neighbors 7. If non-0, restore 2 1 2 1 2 1 0 Modified from David Bacon’s slide in 2001.

7 Bounded Nursery 7 1 2  Situation: mature space is almost full 1 2  Will maximum pause time increase?  Is this understanding correct?

8 RC Buffering 8 Stacks Registers Boot Image & Immortal 1 a 1 c 1 e 1 d 1 f 1 b  Situation: tracking RC is expensive Inc Buffer Dec Buffer a c 2 c 0 a

9 Integration 9 Boot Image & Immortal 1 b Stacks Registers 0 c d d e e f f g g  When doing nursery collection Boot Image & Immortal 1 b Stacks Registers 0 c 0 d 0 e 0 g 0 f Inc Buffer ged f  Decrease d in the next collection to make the increment temporary. Why?

10 Write Barrier 10 Boot Image & Immortal 1 b Stacks Registers 2 c d d e e srcObjsrcSlottgtobj Modified Object Set Dec Buffer b&bd c b e  Prepare for nursery collection  What will happen if b points back to c again?

11 Pause Time Control 11  Phases for Ulterior Garbage Collector  Nursery Collection  RC buffering  RC collection  Cycle collection Bounded pause time Negligible Unbounded in worst case  To control RC collection time  Limit size of modified object buffer, dec buffer  To control cycle collection time  Limit time spent on this work  Why not limit inc buffer size ?

12 Discussion  Cycle detection  On every RC collection, create a candidate set of potential cycle roots from all the decrements which do not go to zero  Cycle detection starts from the candidate set  Do we need a limit to the length of candidate set?  Do such decrements guarantee finding all cycles if time allows? 12

13 www.themegallery.com


Download ppt "Fast Garbage Collection without a Long Wait Steve Blackburn – Kathryn McKinley Presented by: Na Meng Ulterior Reference Counting:"

Similar presentations


Ads by Google