Immix: A Mark-Region Garbage Collector Curtis Dunham CS 395T Presentation Feb 2, 2011 Thanks to Steve Blackburn and Jennifer Sartor for their 2008 and 2009 Immix presentations, respectively. 1 I believe this presentation to be ~95% Steve’s PLDI talk and ~4% Jennifer Sartor’s 395T presentation and < 1% mine
17
Embed
Immix: A Mark-Region Garbage Collector Curtis Dunham CS 395T Presentation Feb 2, 2011 Thanks to Steve Blackburn and Jennifer Sartor for their 2008 and.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
1
Immix: A Mark-Region Garbage Collector
Curtis DunhamCS 395T Presentation
Feb 2, 2011
Thanks to Steve Blackburn and Jennifer Sartor for their 2008 and 2009 Immix presentations, respectively.
I believe this presentation to be ~95% Steve’s PLDI talk and ~4% Jennifer Sartor’s 395T presentation and < 1% mine
2
Comparison to Prior Work; Contributions
Space efficiency Fast Collection
Mutator Performance
Copying
Mark-Sweep
Mark-Compact
Status QuoBefore This Work
Post-Immix:The New World of GC
Immix:Mark-Region w/
OpportunisticDefragmentation
Bump Pointer
Non-Semispace
Does both (every object
either marked or copied)
In One Pass
Locality
3
GC FundamentalsAlgorithmic Components
Allocation ReclamationIdentification
Bump Allocation
Free List
`
Tracing(implicit)
Reference Counting(explicit)
Sweep-to-Free
Compact
Evacuate
3 1
4
Mark-Compact [Styger 1967]
Bump allocation + trace + compact
GC FundamentalsCanonical Garbage Collectors
`
Sweep-to-Free
Compact
Evacuate
Mark-Sweep [McCarthy 1960]
Free-list + trace + sweep-to-free
Semi-Space [Cheney 1970]
Bump allocation + trace + evacuate
5
Sweep-To-Regionand Mark-Region
`
Sweep-to-Free
Compact
Evacuate
Reclamation
Sweep-to-Region
Mark-SweepFree-list + trace + sweep-to-free
Mark-CompactBump allocation + trace + compact
Semi-SpaceBump allocation + trace + evacuate
Mark-RegionBump alloc + trace + sweep-to-region
6
Naïve Mark-Region
• Contiguous allocation into regionsExcellent locality– For simplicity, objects cannot span regions
• Simple mark phase (like mark-sweep)– Mark objects and their containing region
• Demand-driven overflow allocations– Medium objects
• Metadata space overheads– For parallel synch: mark bytes (not bits)– Line and block mark, not just object mark– Defragmentation headroom– Overflow allocation block– Conservative line marking
12
Other Optimizations
Implicit Marking
✓ Most objects small▫ Small objects implicitly mark next line✓ V. Fast common case▫ Large objects mark lines exactly Implicit line mark
Line mark
Overflow Allocation
▫ Multi-line objects may skip many small holes▫ Overflow allocation (used on failure)