Using generational garbage collection to implement cache-conscious data placement
- 1 October 1998
- proceedings article
- Published by Association for Computing Machinery (ACM)
- Vol. 34 (3), 37-48
- https://doi.org/10.1145/286860.286865
Abstract
The cost of accessing main memory is increasing. Machine designers have tried to mitigate the consequences of the processor and memory technology trends underlying this increasing gap with a variety of techniques to reduce or tolerate memory latency. These techniques, unfortunately, are only occasionally successful for pointer-manipulating programs. Recent research has demonstrated the value of a complementary approach, in which pointer-based data structures are reorganized to improve cache locality.This paper studies a technique for using a generational garbage collector to reorganize data structures to produce a cache-conscious data layout, in which objects with high temporal affinity are placed next to each other, so that they are likely to reside in the same cache block. The paper explains how to collect, with low overhead, real-time profiling information about data access patterns in object-oriented languages, and describes a new copying algorithm that utilizes this information to produce a cache-conscious object layout.Preliminary results show that this technique reduces cache miss rates by 21--42%, and improves program performance by 14--37% over Cheney's algorithm. We also compare our layouts against those produced by the Wilson-Lam-Moher algorithm, which attempts to improve program locality at the page level. Our cache-conscious object layouts reduces cache miss rates by 20--41% and improves program performance by 18--31% over their algorithm, indicating that improving locality at the page level is not necessarily beneficial at the cache level.Keywords
This publication has 19 references indexed in Scilit:
- A case for intelligent RAMIEEE Micro, 1997
- An adaptive tenuring policy for generation scavengersACM Transactions on Programming Languages and Systems, 1992
- Effective “static-graph” reorganization to improve locality in garbage-collected systemsACM SIGPLAN Notices, 1991
- A data locality optimizing algorithmACM SIGPLAN Notices, 1991
- Strategies for cache and local memory management by global program transformationJournal of Parallel and Distributed Computing, 1988
- Improving locality of reference in a garbage-collecting memory management systemCommunications of the ACM, 1988
- A real-time garbage collector based on the lifetimes of objectsCommunications of the ACM, 1983
- Cache MemoriesACM Computing Surveys, 1982
- A nonrecursive list compacting algorithmCommunications of the ACM, 1970
- A LISP garbage-collector for virtual-memory computer systemsCommunications of the ACM, 1969