Using Generational Garbage Collection To Implement Cache- conscious Data Placement Trishul M. Chilimbi & James R. Larus מציג : ראובן ביק.

Slides:



Advertisements
Similar presentations
An Implementation of Mostly- Copying GC on Ruby VM Tomoharu Ugawa The University of Electro-Communications, Japan.
Advertisements

Improving Locality of Reference in a Garbage- Collecting Memory Management System Written by: R OBERT C OURTS Presented by: S HAHAR G OLAN.
Garbage collection David Walker CS 320. Where are we? Last time: A survey of common garbage collection techniques –Manual memory management –Reference.
A Block-structured Heap Simplifies Parallel GC Simon Marlow (Microsoft Research) Roshan James (U. Indiana) Tim Harris (Microsoft Research) Simon Peyton.
1 CSIS 7102 Spring 2004 Lecture 9: Recovery (approaches) Dr. King-Ip Lin.
1 Overview Assignment 5: hints  Garbage collection Assignment 4: solution.
Lecture 21 Dynamic Memory Allocation:- *Allocation of objects in program ’ s heap _e.g. C ’ s malloc/free or Pascal ’ s new/dispose _e.g. C ’ s malloc/free.
Copying GC and Reference Counting Jonathan Kalechstain Tel Aviv University 11/11/2014.
Garbage Collection  records not reachable  reclaim to allow reuse  performed by runtime system (support programs linked with the compiled code) (support.
Garbage Collection CSCI 2720 Spring Static vs. Dynamic Allocation Early versions of Fortran –All memory was static C –Mix of static and dynamic.
By Jacob SeligmannSteffen Grarup Presented By Leon Gendler Incremental Mature Garbage Collection Using the Train Algorithm.
NUMA Tuning for Java Server Applications Mustafa M. Tikir.
Ceg860 (Prasad)L9GC1 Memory Management Garbage Collection.
Memory Management. History Run-time management of dynamic memory is a necessary activity for modern programming languages Lisp of the 1960’s was one of.
1 The Compressor: Concurrent, Incremental and Parallel Compaction. Haim Kermany and Erez Petrank Technion – Israel Institute of Technology.
G Robert Grimm New York University Cool Pet Tricks with… …Virtual Memory.
Garbage Collection Mooly Sagiv html://
Memory Management Professor Yihjia Tsai Tamkang University.
MOSTLY PARALLEL GARBAGE COLLECTION Authors : Hans J. Boehm Alan J. Demers Scott Shenker XEROX PARC Presented by:REVITAL SHABTAI.
Virtual Memory Primitives for User Programs Andrew W. Appel and Kai Li Presented by: Khanh Nguyen.
Generational Stack Collection And Profile driven Pretenuring Perry Cheng Robert Harper Peter Lee Presented By Moti Alperovitch
Reducing Garbage Collector Cache Misses Shachar Rubinstein Garbage Collection Seminar.
Data Access Profiling & Improved Structure Field Regrouping in Pegasus Vas Chellappa & Matt Moore May 2, 2005 / Optimizing Compilers / Project Poster Session.
Memory Subsystem Performance of Programs using Coping Garbage Collection Authers: Amer Diwan David Traditi Eliot Moss Presented by: Ronen Shabo.
Runtime The optimized program is ready to run … What sorts of facilities are available at runtime.
Memory Management 2010.
Garbage collection David Walker CS 320. Where are we? Last time: A survey of common garbage collection techniques –Manual memory management –Reference.
Incremental Garbage Collection
1 PATH: Page Access Tracking Hardware to Improve Memory Management Reza Azimi, Livio Soares, Michael Stumm, Tom Walsh, and Angela Demke Brown University.
Memory Allocation and Garbage Collection. Why Dynamic Memory? We cannot know memory requirements in advance when the program is written. We cannot know.
Incremental Path Profiling Kevin Bierhoff and Laura Hiatt Path ProfilingIncremental ApproachExperimental Results Path profiling counts how often each path.
Age-Oriented Concurrent Garbage Collection Harel Paz, Erez Petrank – Technion, Israel Steve Blackburn – ANU, Australia April 05 Compiler Construction Scotland.
1 An Efficient On-the-Fly Cycle Collection Harel Paz, Erez Petrank - Technion, Israel David F. Bacon, V. T. Rajan - IBM T.J. Watson Research Center Elliot.
Garbage collection (& Midterm Topics) David Walker COS 320.
1 Reducing Generational Copy Reserve Overhead with Fallback Compaction Phil McGachey and Antony L. Hosking June 2006.
The Euler-tour technique
Jangwoo Shin Garbage Collection for Real-Time Java.
Uniprocessor Garbage Collection Techniques Paul R. Wilson.
UniProcessor Garbage Collection Techniques Paul R. Wilson University of Texas Presented By Naomi Sapir Tel-Aviv University.
A Parallel, Real-Time Garbage Collector Author: Perry Cheng, Guy E. Blelloch Presenter: Jun Tao.
1 Overview Assignment 6: hints  Living with a garbage collector Assignment 5: solution  Garbage collection.
Flexible Reference-Counting-Based Hardware Acceleration for Garbage Collection José A. Joao * Onur Mutlu ‡ Yale N. Patt * * HPS Research Group University.
Exploiting Prolific Types for Memory Management and Optimizations By Yefim Shuf et al.
Indexing structures for files D ƯƠ NG ANH KHOA-QLU13082.
Cache Locality for Non-numerical Codes María Jesús Garzarán University of Illinois at Urbana-Champaign.
Institute of Computing Technology On Improving Heap Memory Layout by Dynamic Pool Allocation Zhenjiang Wang Chenggang Wu Institute of Computing Technology,
A Real-Time Garbage Collector Based on the Lifetimes of Objects Henry Lieberman and Carl Hewitt (CACM, June 1983) Rudy Kaplan Depena CS395T: Memory Management.
Cache-Conscious Structure Definition By Trishul M. Chilimbi, Bob Davidson, and James R. Larus Presented by Shelley Chen March 10, 2003.
© Imperial College London Exploring the Barrier to Entry Incremental Generational Garbage Collection for Haskell Andy Cheadle & Tony Field Imperial College.
1 Data layouts for object-oriented programs Martin Hirzel IBM Research SIGMETRICS 6/16/2007.
1 Real-Time Replication Garbage Collection Scott Nettles and James O’Toole PLDI 93 Presented by: Roi Amir.
Incremental Garbage Collection Uwe Kern 23. Januar 2002
Runtime Environments. Support of Execution  Activation Tree  Control Stack  Scope  Binding of Names –Data object (values in storage) –Environment.
Memory Management II: Dynamic Storage Allocation Mar 7, 2000 Topics Segregated free lists –Buddy system Garbage collection –Mark and Sweep –Copying –Reference.
OOPLs /FEN March 2004 Object-Oriented Languages1 Object-Oriented Languages - Design and Implementation Java: Behind the Scenes Finn E. Nordbjerg,
UniProcessor Garbage Collection Techniques Paul R. Wilson University of Texas Presented By Naomi Sapir Tel-Aviv University.
1 Garbage Collection Advantage: Improving Program Locality Xianglong Huang (UT) Stephen M Blackburn (ANU), Kathryn S McKinley (UT) J Eliot B Moss (UMass),
Runtime The optimized program is ready to run … What sorts of facilities are available at runtime.
2/4/20161 GC16/3011 Functional Programming Lecture 20 Garbage Collection Techniques.
1 GC Advantage: Improving Program Locality Xianglong Huang, Zhenlin Wang, Stephen M Blackburn, Kathryn S McKinley, J Eliot B Moss, Perry Cheng.
Improving Cache Performance of OCaml Programs Case Study - MetaPRL Alexey Nogin and Alexei Kopylov April 15, 1999.
® July 21, 2004GC Summer School1 Cycles to Recycle: Copy GC Without Stopping the World The Sapphire Collector Richard L. Hudson J. Eliot B. Moss Originally.
CS412/413 Introduction to Compilers and Translators April 21, 1999 Lecture 30: Garbage collection.
GC Assertions: Using the Garbage Collector To Check Heap Properties Samuel Z. Guyer Tufts University Edward Aftandilian Tufts University.
Runtime Environments Chapter 7. Support of Execution  Activation Tree  Control Stack  Scope  Binding of Names –Data object (values in storage) –Environment.
Eliminating External Fragmentation in a Non-Moving Garbage Collector for Java Author: Fridtjof Siebert, CASES 2000 Michael Sallas Object-Oriented Languages.
Checkpoint Presentation Vas Chellappa Matt Moore
José A. Joao* Onur Mutlu‡ Yale N. Patt*
File Organization.
The Design and Implementation of a Log-Structured File System
Presentation transcript:

Using Generational Garbage Collection To Implement Cache- conscious Data Placement Trishul M. Chilimbi & James R. Larus מציג : ראובן ביק

Introduction n Main memory access cost is increasing n goal : to improve cache locality n 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

Contents n background –copying GC –generational GC n the method –profiling instrumentation –affinity graph –algorithm steps n results & conclusions

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

Copying GC

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

Copying GC (cheney algorithm)

Why Generational GC ? n Most objects live a very short time, while a small percentage of them live much longer n problem : repeated copying of old objects

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

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

Real time data access profiling

Profiling is low-overhead n Implemented at object, not field, granularity n most object accesses are not lightweight

Affinity graph n Is based on object access buffer n created prior to scavenge n separate graph for each generation n nodes=objects n edges=affinity between objects

ADFGDACCAFDGACADFGDACCAFDGAC A D 1

ADFGDACCAFDGACADFGDACCAFDGAC A D 1 F 1 1

ADFGDACCAFDGACADFGDACCAFDGAC A D 1 F 1 1 G 1 1

ADFGDACCAFDGACADFGDACCAFDGAC A D 1 F 1 2 G 1 2

Cache-conscious copying algorithm n From the set of roots, pick the one with the highest affinity edge n perform a greedy depth first traversal of the affinity graph starting from this node n while traversing, copy each visited object to TOSPACE Step1:

Cache-conscious copying algorithm n Process all objects between the unprocessed and free pointers, using Cheney algorithm Step2:

Cache-conscious copying algorithm n Cleanup : copy any roots not present to TOSPACE and process using Cheney algorithm Step3:

n this algorithm is not used in the youngest generation (where new objects are allocated and most of the garbage is generated)

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

Conclusions n 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.