The hardness of cache conscious data placement

  • Authors:
  • Erez Petrank;Dror Rawitz

  • Affiliations:
  • Department of Computer Science, Technion, Haifa, Israel;Caesarea Rothschild Institute, University of Haifa, Haifa, Israel and Technion's Department of Computer Science

  • Venue:
  • Nordic Journal of Computing
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

We investigate the complexity of finding an optimal placement of objects (or code) in the memory, in the sense that this placement reduces the number of cache misses during program execution to the minimum. We show that this problem is one of the toughest amongst the interesting NP optimization problems in computer science, in particular, suppose one is given a sequence of memory accesses and one has to place the data in the memory so as to minimize the number of cache misses for this sequence. We show that if P ≠ NP, then one cannot efficiently approximate the optimal solution even up to a very liberal approximation ratio. Thus, this problem joins the family of extremely inapproximable optimization problems. Two famous members in this family are minimum graph coloring and maximum clique. In light of this harsh lower bound only mild approximation ratios can be obtained. We provide an algorithm that can map arbitrary access sequences within such a mild ratio.Next, we study the information loss when compressing the access sequence, keeping only pairwise relations. We show that the reduced information hides the optimal solution and highlights solutions that are far from optimal. Furthermore, we show that even if one restricts his attention to pairwise information, finding a good placement is computationally difficult.