Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1806651.1806670acmconferencesArticle/Chapter ViewAbstractPublication PagesismmConference Proceedingsconference-collections
research-article

A graph theoretic approach to cache-conscious placement of data for direct mapped caches

Published: 05 June 2010 Publication History

Abstract

Caches were designed to amortize the cost of memory accesses by moving copies of frequently accessed data closer to the processor. Over the years the increasing gap between processor speed and memory access latency has made the cache a bottleneck for program performance. Enhancing cache performance has been instrumental in speeding up programs. For this reason several hardware and software techniques have been proposed by researchers to optimize the cache for minimizing the number of misses. Among these are compile-time data placement techniques in memory which improve cache performance. For the purpose of this work, we concern ourselves with the problem of laying out data in memory given the sequence of accesses on a finite set of data objects such that cache-misses are minimized. The problem has been shown to be hard to solve optimally even if the sequence of data accesses is known at compile time. In this paper we show that given a direct-mapped cache, its size, and the data access sequence, it is possible to identify the instances where there are no conflict misses. We describe an algorithm that can assign the data to cache for minimal number of misses if there exists a way in which conflict misses can be avoided altogether. We also describe the implementation of a heuristic for assigning data to cache for instances where the size of the cache forces conflict misses. Experiments show that our technique results in a 30% reduction in the number of cache misses compared to the original assignment.

References

[1]
A. Aggarwal. Software Caching vs. Prefetching. In ISMM '02: Proceedings of the 3rd International Symposium on Memory Management, pages 157--162, 2002.
[2]
A. H. Badawy, A. Aggarwal, D. Yeung, and C. Tseng. Evaluating the Impact of Memory System Performance on Software Prefetching and Locality Optimizations. In ICS '01: Proceedings of the 15th International Conference on Supercomputing, pages 486--500, 2001.
[3]
R. E. Bixby, K. Kennedy, and U. Kremer. Automatic Data Layout Using 0-1 Integer Programming. In PACT '94: Proceedings of the IFIP WG10.3Working Conference on Parallel Architectures and Compilation Techniques, pages 111--122, 1994.
[4]
B. Calder, C. Krintz, S. John, and T. Austin. Cache-Conscious Data Placement. In ASPLOS VIII: Proceedings of the 8th International Conference on Architectural Support for Programming Languages and Operating Systems, pages 139--149, 1998.
[5]
D. Callahan, K. Kennedy, and A. Porterfield. Software Prefetching. In ASPLOS IV: Proceedings of the Fourth International Conference on Architectural Support for Programming Languages and Operating Systems, pages 40--52, April 08-11, 1991.
[6]
T. M. Chilimbi. Efficient Representations and Abstractions for Quantifying and Exploiting Data Reference Locality. In PLDI '01: Proceedings of the ACM SIGPLAN 2001 Conference on Programming Language Design and Implementation, pages 191--202, 2001.
[7]
T. M. Chilimbi, B. Davidson, and J. R. Larus. Cache-Conscious Structure Definition. In PLDI '99: Proceedings of the ACM SIGPLAN Conference on Programming Languages Design and Implementation, 1--12, 1999.
[8]
T. M. Chilimbi, M. D. Hill, and J. R. Larus. Cache-Conscious Structure Layout. In PLDI '99: Proceedings of the ACM SIGPLAN Conference on Programming Languages Design and Implementation, 1--12, 1999.
[9]
T. M. Chilimbi, and M. Hirzel. Dynamic Hot Data Stream Prefetching for General-Purpose Programs. In PLDI '02: Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation, June 17-19, 2002.
[10]
T. M. Chilimbi, and J. R. Larus. Using Generational Garbage Collection to Implement Cache-Conscious Data Placement. In ISMM '98: Proceedings of the 1st International Symposium on Memory Management, 37--48, 1998.
[11]
S. Curial, P. Zhao, J. N. Amaral, Y. Gao, S. Cui, R. Silvera, and R. Archambault. Memory Pooling Assisted Data Splitting (MPADS). Proceedings of the 7th International Symposium on Memory Management, June 07-08, pages 101--110, 2008, Tucson, AZ, USA
[12]
C. Ding, and K. Kennedy. Improving Cache Performance in Dynamic Applications through Data and Computation Reorganization at Run Time. In PLDI '99: Proceedings of the ACM SIGPLAN 1999 Conference on Programming Language Design and Implementation, pages 229--241, May 01-04, 1999.
[13]
C. Ding, and Y. Zhong. Predicting Whole-Program Locality through Reuse Distance Analysis. In PLDI '03: Proceedings of the ACM SIGPLAN 2003 Conference on Programming Language Design and Implementation, pages 245--257, 2003.
[14]
M. C. Golumbic. Algorithmic Graph Theory and Perfect Graphs (Annals of Discrete Mathematics, Vol 57). North-Holland Publishing Co., Amsterdam, The Netherlands, The Netherlands, 2004
[15]
X. Gu, I. Christopher, T. Bai, C. Zhang, and C. Ding. A Component Model of Spatial Locality. Proceedings of the 2009 International Symposium on Memory Management, June 19-20, 2009, Dublin, Ireland
[16]
J. L. Hennessy, D. A. Patterson, and A. C. Arpaci-Dusseau. Computer Architecture: A Quantitative Approach. Fourth Edition, 2007. Morgan Kaufman Publishers.
[17]
G. Jin, J. Mellor-Crummey, and R. Fowler. Increasing Temporal Locality with Skewing and Recursive Blocking. Proceedings of the 2001 ACM/IEEE conference on Supercomputing, pages 43--43, 2001.
[18]
A. Jula, and L. Rauchwerger. Two Memory Allocators that use Hints to Improve Locality. In ISMM '09: Proceedings of the 2009 International Symposium on Memory Management, June 19-20, 2009.
[19]
C. Lattner, and V. Adve. Automatic Pool Allocation: Improving Performance by Controlling Data Structure Layout in the Heap. In PLDI '05: Proceedings of the 2005 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 129--142, 2005.
[20]
E. Petrank, and D. Rawitz. The Hardness of Cache Conscious Data Placement. In POPL '02: Proceedings of the 29th ACM SIGPLANSIGACT symposium on Principles of Programming Languages, pages 101--112, 2002.
[21]
E. Petrank, and D. Rawitz. The Hardness of Cache Conscious Data Placement. Nordic Journal of Computing, vol 12(3), pages 275--307, 2005.
[22]
G. B. Prokopski, and C. Verbrugge. Analyzing the Performance of Code-Copying Virtual Machines. In OOPSLA '08: Proceedings of the 23rd ACM SIGPLAN Conference on Object-Oriented Programming Systems Languages and Applications, pages 403--422, 2008.
[23]
X. Shen, J. Shaw, B. Meeker, and C. Ding. Locality Approximation Using Time. In POPL '07: Proceedings of the 34th annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 55--61, 2007.
[24]
K. O.Thabit. Cache Management by the Compiler. Ph.D. thesis, Rice University, 1982.
[25]
M. E. Wolf, D. E. Maydan, and D. Chen. Combining Loop Transformations Considering Caches and Scheduling. In the International Journal of Parallel Programming, vol 26(4), pages 479--503 1998.
[26]
C. Zhang, C. Ding, M. Ogihara, Y. Zhong, and Y. Wu. A Hierarchical Model of Data Locality. In POPL '06: Conference of the 33rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 16--29, 2006.
[27]
Y. Zhong, amd W. Chang. Sampling-based Program Locality Approximation. Proceedings of the 7th International Symposium on Memory Management, June 07-08, 2008, Tucson, AZ, USA
[28]
Y. Zhong, X. Shen, and C. Ding. Program Locality Analysis using Reuse Distance. ACM Transactions on Programming Languages and Systems (TOPLAS), v.31 n.6, p.1--39, August 2009

Cited By

View all
  • (2016)Data-Space Relocation to Improve Data Cache Performance for Embedded Multi-threaded Processor SystemsProceedings of the Fifth International Conference on Network, Communication and Computing10.1145/3033288.3033335(193-197)Online publication date: 17-Dec-2016

Index Terms

  1. A graph theoretic approach to cache-conscious placement of data for direct mapped caches

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ISMM '10: Proceedings of the 2010 international symposium on Memory management
June 2010
140 pages
ISBN:9781450300544
DOI:10.1145/1806651
  • General Chair:
  • Jan Vitek,
  • Program Chair:
  • Doug Lea
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 45, Issue 8
    ISMM '10
    August 2010
    129 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1837855
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 05 June 2010

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. cache consciousness
  2. cache optimization
  3. data placement in cache
  4. memory management
  5. offline algorithms

Qualifiers

  • Research-article

Conference

ISMM '10
Sponsor:
ISMM '10: International Symposium on Memory Management
June 5 - 6, 2010
Ontario, Toronto, Canada

Acceptance Rates

Overall Acceptance Rate 72 of 156 submissions, 46%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)7
  • Downloads (Last 6 weeks)1
Reflects downloads up to 26 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (2016)Data-Space Relocation to Improve Data Cache Performance for Embedded Multi-threaded Processor SystemsProceedings of the Fifth International Conference on Network, Communication and Computing10.1145/3033288.3033335(193-197)Online publication date: 17-Dec-2016

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media