/
Fast Garbage Collection without a Long Wait Fast Garbage Collection without a Long Wait

Fast Garbage Collection without a Long Wait - PowerPoint Presentation

mitsue-stanley
mitsue-stanley . @mitsue-stanley
Follow
394 views
Uploaded On 2017-06-29

Fast Garbage Collection without a Long Wait - PPT Presentation

Steve Blackburn Kathryn McKinley Presented by Na Meng Ulterior Reference Counting Throughput vs Responsiveness Goal Better responsiveness shorter pause time Better throughput running time ID: 564549

buffer time cycle collection time buffer collection cycle pause amp nursery ulterior boot image immortal stacks detection control registers

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Fast Garbage Collection without a Long W..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

Fast Garbage Collection without a Long Wait

Steve Blackburn – Kathryn McKinleyPresented by: Na Meng

Ulterior Reference Counting:Slide2

Throughput vs. Responsiveness

GoalBetter responsiveness (shorter pause time)

Better throughput (running time)

GC

mutator

CPU Utilization (

time

)

mutator

poor responsiveness

maximum pause

2

Thanks to

Dimitris

for his presentation in 2009.Slide3

Copying

GC time proportional to survivorsIdeal for collecting high mortality young objectsReference CountingGC time proportional to mutationsIdeal for collecting objects with low mutation

3

Young objects

High

mortality

High mutation

Old objects

Low mortality

Low mutation

Ulterior Reference CountingSlide4

Basic Idea

4

Thanks to Curtis

for his presentation

recently.

Young nursery space

RC-mature space

1

2

0

1Slide5

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 ControlSlide6

Cycle Detection

6

2

2

3

2

2

Root Buffer

Live

Data

1

1

1

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

Bounded Nursery

7

1

2

Situation:

mature space is almost full

1

2

Will

maximum

pause time increase?

Is this understanding correct?Slide8

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

aSlide9

Integration

9

Boot Image & Immortal

1

b

Stacks Registers

0

c

d

e

f

g

When doing nursery collection

Boot Image & Immortal

1

b

Stacks Registers

0

c

0

d

0

e

0

g

0

f

Inc

Buffer

g

e

d

f

Decrease

d

in

the next collection to make the increment temporary. Why?Slide10

Write Barrier

10

Boot Image & Immortal

1

b

Stacks Registers

2

c

d

e

srcObj

srcSlot

tgtobj

Modified Object Set

Dec

Buffer

b

&

b

d

c

b

&

b

e

Prepare for nursery collection

What will happen if

b

points back to

c

again?Slide11

Pause Time Control

11Phases for Ulterior Garbage CollectorNursery 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

To control cycle collection time

Limit time spent on this work

Why

no

t

limit inc buffer size ?Slide12

Discussion

Cycle detectionOn every RC collection, create a candidate set of potential cycle roots from all the decrements which do not go to zeroCycle 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?

12Slide13

www.themegallery.com

Thank You !