Using Generational Garbage Collection To Implement Cacheconscious Data Placement - PowerPoint PPT Presentation

About This Presentation
Title:

Using Generational Garbage Collection To Implement Cacheconscious Data Placement

Description:

Copying GC (cheney algorithm) Why Generational GC ? ... Process all objects between the unprocessed and free pointers, using Cheney algorithm ... – PowerPoint PPT presentation

Number of Views:115
Avg rating:3.0/5.0
Slides: 29
Provided by: vladim4
Category:

less

Transcript and Presenter's Notes

Title: Using Generational Garbage Collection To Implement Cacheconscious Data Placement


1
Using Generational Garbage Collection To
Implement Cache-conscious Data Placement
  • Trishul M. Chilimbi James R. Larus
  • ???? ????? ???

2
Introduction
  • Main memory access cost is increasing
  • goal to improve cache locality
  • introducing a technique for using a (copying)
    generational GC to reorganize data, so that
    objects with high temporal affinity are placed
    next to each other and thus are likely to reside
    in the same cache block

3
Contents
  • background
  • copying GC
  • generational GC
  • the method
  • profiling instrumentation
  • affinity graph
  • algorithm steps
  • results conclusions

4
Copying GC
  • Two memory areas
  • When FROMSPACE is full, moves all the live
    objects from FROMSPACE to TOSPACE

5
Copying GC
6
Copying GC (cheney algorithm)
  • Breadth-first scan of the tree
  • one continuous scan of TOSPACE

7
Copying GC (cheney algorithm)
8
Why Generational GC ?
  • Most objects live a very short time, while a
    small percentage of them live much longer
  • problem repeated copying of old objects

9
Generational GC
  • segregating objects into multiple areas by age
  • scavenge older objects less frequently
  • copy long surviving objects to older generations

10
Real time data access profiling
  • Real time profiling is more effective then an
    earlier training run
  • must be low overhead
  • done by modified compiler
  • upon access , the object address is written into
    an object access buffer

11
Real time data access profiling
12
Profiling is low-overhead
  • Implemented at object, not field, granularity
  • most object accesses are not lightweight

13
Affinity graph
  • Is based on object access buffer
  • created prior to scavenge
  • separate graph for each generation
  • nodesobjects
  • edgesaffinity between objects

14
ADFGDACCAFDGAC
A
1
D
15
ADFGDACCAFDGAC
A
1
F
1
1
D
16
ADFGDACCAFDGAC
A
1
F
1
1
1
G
D
1
17
ADFGDACCAFDGAC
A
1
F
1
1
2
G
D
2
18
Cache-conscious copying algorithm
Step1
  • From the set of roots, pick the one with the
    highest affinity edge
  • perform a greedy depth first traversal of the
    affinity graph starting from this node
  • while traversing, copy each visited object to
    TOSPACE

19
(No Transcript)
20
Cache-conscious copying algorithm
Step2
  • Process all objects between the unprocessed and
    free pointers, using Cheney algorithm

21
(No Transcript)
22
Cache-conscious copying algorithm
Step3
  • Cleanup copy any roots not present to TOSPACE
    and process using Cheney algorithm

23
(No Transcript)
24
  • this algorithm is not used in the youngest
    generation (where new objects are allocated and
    most of the garbage is generated)

25
Results
  • Tested on 5 Cecil language programs
  • on a Sun computer with 2GB memory, with 2 level
    cache, running Solaris

26
(No Transcript)
27
(No Transcript)
28
Conclusions
  • This is an attractive technique that reduces
    cache miss rates by 21-42 and improves program
    performance by 14-37 , as compared to the
    commonly used alternative.
Write a Comment
User Comments (0)
About PowerShow.com