Top Banner
Improving Locality of Improving Locality of Reference in a Reference in a Garbage-Collecting Garbage-Collecting Memory Management Memory Management System System Written by: ROBERT COURTS Presented by: SHAHAR GOLAN
12

Improving Locality of Reference in a Garbage- Collecting Memory Management System Written by: R OBERT C OURTS Presented by: S HAHAR G OLAN.

Mar 29, 2015

Download

Documents

Allyson Statton
Welcome message from author
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
Page 1: Improving Locality of Reference in a Garbage- Collecting Memory Management System Written by: R OBERT C OURTS Presented by: S HAHAR G OLAN.

Improving Locality of Improving Locality of Reference in a Garbage-Reference in a Garbage-Collecting Memory Collecting Memory Management SystemManagement System

Written by: ROBERT COURTS

Presented by: SHAHAR GOLAN

Page 2: Improving Locality of Reference in a Garbage- Collecting Memory Management System Written by: R OBERT C OURTS Presented by: S HAHAR G OLAN.

About the ArticleAbout the Article

• Written in 1988

• Temporal Copying GC

• LISP Oriented

Page 3: Improving Locality of Reference in a Garbage- Collecting Memory Management System Written by: R OBERT C OURTS Presented by: S HAHAR G OLAN.

THE END THE END

Page 4: Improving Locality of Reference in a Garbage- Collecting Memory Management System Written by: R OBERT C OURTS Presented by: S HAHAR G OLAN.

Basic Copying GCBasic Copying GC

3 Logical Address Spaces:

• from space

• scavenge space

• new space

After a flip,I’m all there is!

I may point,where ever I like!I never point

into the red zone!

Page 5: Improving Locality of Reference in a Garbage- Collecting Memory Management System Written by: R OBERT C OURTS Presented by: S HAHAR G OLAN.

1,1

3,3

0,0

2,2GENERATION

Basic Temporal CGCBasic Temporal CGC

2,1

3,03,13,2

2,0

1,0VOLATILITY

• Classify by age

• Classify by volatility

Where are the objects?

1,1

3,3

0,0

2,2

5% 95%

Page 6: Improving Locality of Reference in a Garbage- Collecting Memory Management System Written by: R OBERT C OURTS Presented by: S HAHAR G OLAN.

Basic Temporal CGCBasic Temporal CGC

• Collecting the 0th. Generation

Indirection Cells are not folded!

2,1

1,1

3,03,13,23,3

0,0

2,02,2

1,0VOLATILITY

GENERATION

2,1

1,1

3,03,13,23,3

0,0

2,02,2

1,0

2,1

1,1

3,03,13,23,3

0,0

2,02,2

1,0

• Collecting the 1st. Generation

Indirection Cells are folded.

Page 7: Improving Locality of Reference in a Garbage- Collecting Memory Management System Written by: R OBERT C OURTS Presented by: S HAHAR G OLAN.

ReferencReferencee

Related Work• Garbage Collection in a Large Lisp System

D.A. MOON 1984

• Improving Locality of Reference in a Garbage-Collecting Memory Management System

ROBERT COURTS, 1988

• Effective ’Static-Graph’ Recognition to Improve Locality in Garbage-Collecting Systems

• Object Type Directed Garbage Collection to Improve Locality

PAUL R. WILSON, MICHAEL S. LAM & THOMAS G. MOHLER, 1991-1992

• Using Generational Garbage Collection to Implement Cache-Conscious Data Placement

TRISHUL M. CHILIMBI & JAMES R. LARUS, Oct. 1998

Improving Locality of Improving Locality of Reference in a Garbage-Reference in a Garbage-Collecting Memory Collecting Memory Management SystemManagement System

Written by: ROBERT COURTS

Presented by: SHAHAR GOLAN

Locality ofLocality of

Page 8: Improving Locality of Reference in a Garbage- Collecting Memory Management System Written by: R OBERT C OURTS Presented by: S HAHAR G OLAN.

Locality of ReferenceLocality of ReferenceWatershed Experiment

• Flip the entire system to FROM Space• Inhibit the scavenger• Use the system• Copy objects to NEW Space by need

Observed results:• 4MB/30MB (only 13%) where copied.• Paging activity has dramatically

declined.

Page 9: Improving Locality of Reference in a Garbage- Collecting Memory Management System Written by: R OBERT C OURTS Presented by: S HAHAR G OLAN.

Locality of ReferenceLocality of ReferenceAdaptive Training

• Flip a generation• Copy objects by need• Activate scavenger• Reclaim FROM SPACE

Major drawback: We hardly learn about the dynamic objects in the higher generations.

Page 10: Improving Locality of Reference in a Garbage- Collecting Memory Management System Written by: R OBERT C OURTS Presented by: S HAHAR G OLAN.

Locality of ReferenceLocality of ReferenceAdaptive Training

2,1

1,1

3,03,13,23,3

0,0

2,02,2

1,0VOLATILITY

GENERATION

3,3 3,3

2,2

1,1

3,3

2,2

ACTIVITY

3 2 1 0

Scavenger Access

Mutator Access

Page 11: Improving Locality of Reference in a Garbage- Collecting Memory Management System Written by: R OBERT C OURTS Presented by: S HAHAR G OLAN.

From the Watershed Experiment we may conclude that a good caching scheme should be sufficient for most memory management systems. GC may be done infrequently on a ‘stop the world’ basis. (e.g., once every three months.)

Dead objects will stay on large disks but will quickly disappear from cache and memory, freeing the space to live and frequently used ones.

GC GC -- Personal View Personal View

Page 12: Improving Locality of Reference in a Garbage- Collecting Memory Management System Written by: R OBERT C OURTS Presented by: S HAHAR G OLAN.

,,Court’s dynamic regrouping technique takes advantage of specialized hardware to provide incremental garbage collection, which tends to move objects to TO space in program access order, and this can dramatically reduce the number of page faults.’’

Chilimbi & Larus (Oct. 1998)

//