In this paper we study positioning strategies for improving the performance of a memory system with a direct mapped cache. A positioning technique determines for every program item, (instruction or data), its address in main memory.Assuming the Independent Reference Model, we break the general positioning problem into two, the collision minimization and the grouping problems and show optimal algorithms for both problems. Using these algorithms we derive an optimal algorithm for the general positioning problem.Since the optimal positioning is of very special structure we consider other, less restricted, positionings. We show that the quality of a class of natural assignments that distribute the items almost arbitrarily is good as long as the optimal hit ratio is sufficiently large. Another possible requirement is that the items should be distributed as evenly as possible. We find an optimal assignment for the special case of the pair assignment.In addition we look at the expected performance gain of two frequently suggested cache features. The cache bypass feature supports the access of items in memory without loading the item into the cache. We show an assignment with best possible hit ratio. Also it is shown that a cache which employs a random assignment policy, i.e., the assignment of an item is determined randomly, does not improve the expected hit ratio.
[1]
Donald E. Knuth,et al.
An Analysis of Optimum Caching
,
1985,
J. Algorithms.
[2]
Amiya K. Chakravarty,et al.
Consecutive Optimizers for a Partitioning Problem with Applications to Optimal Inventory Groupings for Joint Replenishment
,
1985,
Oper. Res..
[3]
Alan Jay Smith,et al.
Aspects of cache memory and instruction buffer performance
,
1987
.
[4]
Rajiv Gupta,et al.
Improving instruction cache behavior by reducing cache pollution
,
1990,
Proceedings SUPERCOMPUTING '90.
[5]
Awi Federgruen,et al.
Structured Partitioning Problems
,
1991,
Oper. Res..
[6]
W. W. Hwu,et al.
Achieving high instruction cache performance with an optimizing compiler
,
1989,
ISCA '89.
[7]
Stephen J. Hartley.
Compile-Time Program Restructuring in Multiprogrammed Virtual Memory Systems
,
1988,
IEEE Trans. Software Eng..
[8]
Donald J. Hatfield,et al.
Program Restructuring for Virtual Memory
,
1971,
IBM Syst. J..
[9]
Peter A. Franaszek,et al.
Some Distribution-Free Aspects of Paging Algorithm Performance
,
1974,
JACM.
[10]
S. McFarling.
Program optimization for instruction caches
,
1989,
ASPLOS 1989.