1 / 13

Fast Garbage Collection without a Long Wait

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

bevan
Download Presentation

Fast Garbage Collection without a Long Wait

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

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

  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 • Young objects • High mortality • High mutation • Old objects • Low mortality • Low mutation Ulterior Reference Counting

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

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

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

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

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

  9. 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?

  10. 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?

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

  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?

  13. Thank You ! www.themegallery.com

More Related