130 likes | 244 Vues
This presentation explores Ulterior Reference Counting (URC) as a novel approach to garbage collection, focusing on balancing pause times with overall throughput. It highlights the efficiency of URC in managing young objects with high mortality and discusses the advantages of controlling maximum pause times. The authors, Steve Blackburn and Kathryn McKinley, present techniques for integrating URC with traditional garbage collection methods, emphasizing cycle detection and adaptive nursery buffering. This work aims to achieve better application responsiveness while ensuring efficient resource utilization.
E N D
Ulterior Reference Counting: Fast Garbage Collection without a Long Wait Steve Blackburn – Kathryn McKinley Presented by: Na Meng
mutator mutator poor responsiveness maximum pause GC CPU Utilization (time) Throughput vs. Responsiveness • Goal • Better responsiveness (shorter pause time) • Better throughput (running time) Thanks to Dimitris for his presentation in 2009.
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 • Young objects • High mortality • High mutation • Old objects • Low mortality • Low mutation Ulterior Reference Counting
Basic Idea Young nursery space RC-mature space 1 2 0 1 • Thanks to Curtis for his presentation recently.
Ulterior Reference Counting Parameter Control Pause time Write Barrier Old-new pointer Integrate Non-RC to RC RC buffering Expensive RC tracking Bounded nursery Expensive cycle detection Cycle detection Cyclic structures
3 3 3 2 0 1 1 2 Live Data 2 1 2 0 1 1 1 1 1 0 1 1 0 2 2 2 2 3 1 1 1 3 1 1 1 1 1 0 1 0 0 0 0 3 1 3 1 1 1 1 2 3 3 0 1 0 2 3 0 0 1 0 2 Cycle Detection Root Buffer Cycle Buffer 1. Process Decrements 4. Collect White 2. Mark Gray 5. Calculate external in-degree 3. Scan 6. If 0, GC/decrement neighbors 7. If non-0, restore Modifiedfrom David Bacon’s slide in 2001.
Bounded Nursery • Situation: mature space is almost full 1 2 1 2 • Is this understanding correct? • Will maximum pause time increase?
RC Buffering • Situation: tracking RC is expensive Stacks Registers Boot Image & Immortal Inc Buffer Dec Buffer a c a e f b c d 0 1 1 1 2 1 1 1 a c
e g Integration • When doing nursery collection Stacks Registers g e d f Boot Image & Immortal Stacks Registers d c c f g e 0 0 0 0 0 0 Boot Image & Immortal Inc Buffer f d b b 1 1 • Decreased in the next collection to make the increment temporary. Why?
Write Barrier • Prepare for nursery collection Stacks Registers e d Boot Image & Immortal b srcObj b srcSlot &b &b e d tgtobj Modified Object Set Dec Buffer c c b 1 2 • What will happen if b points back to c again?
Pause Time Control • Phases for Ulterior Garbage Collector • Nursery Collection • RC buffering • RC collection • Cycle collection Bounded pause time Negligible Unbounded in worst case Unbounded in worst case • To control RC collection time • Limit size of modified object buffer, dec buffer • Whynot limit inc buffer size ? • To control cycle collection time • Limit time spent on this work
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?
Thank You ! www.themegallery.com