skip to main content
10.1145/3075564.3075571acmconferencesArticle/Chapter ViewAbstractPublication PagescfConference Proceedingsconference-collections
research-article

Optimal On-Line Computation of Stack Distances for MIN and OPT

Published: 15 May 2017 Publication History

Abstract

The replacement policies known as MIN and OPT are optimal for a two-level memory hierarchy. The computation of the cache content for these policies requires the off-line knowledge of the entire address trace. However, the stack distance of a given access, that is, the smallest capacity of a cache for which that access results in a hit, is independent of future accesses and can be computed on-line. Off-line and on-line algorithms to compute the stack distance in time O(V) per access have been known for several decades, where V denotes the number of distinct addresses within the trace. The off-line time bound was recently improved to O(√V log V).
This paper introduces the Critical Stack Algorithm for the online computation of the stack distance of MIN and OPT, in time O(log V) per access. The result exploits a novel analysis of properties of OPT and data structures based on balanced binary trees. A corresponding Ω(log V) lower bound is derived by a reduction from element distinctness; this bound holds in a variety of models of computation and applies even to the off-line simulation of just one cache capacity.

References

[1]
Aggarwal, A., Alpern, B., Chandra, A., Snir, M.: A model for hierarchical memory. In Proc. of the 19th ACM Symposium on Theory of Computing, 305--314, ACM (1987)
[2]
Aho, A. V., Hopcroft, J.E., Ullman, J.D.: The design and analysis of computer algorithms. Addison-Wesley (1974)
[3]
Allen, R., Kennedy, K.: Optimizing compilers for modern architectures. Morgan Kauffman (2002)
[4]
Almàsi, G., Cascaval, C., Padua, D.: Calculating stack distances efficiently. In Proc. ACM SIGPLAN Workshop on Memory Systems Performance, Berlin, Germany (June 2002), 37--43
[5]
Belady, L.A.: A study of replacement algorithms for a virtual-storage computer. IBM System journal, 5(2), 78--101 (1966)
[6]
Belady, L.A.: On-line systems for measuring the efficiency of replacement algorithms. US Patent 3,577,185 (1971)
[7]
Belady, L.A., Palermo, F.P.: On-line measurement of paging behavior by the multivalued MIN algorithm. IBM J. of Research and Development, 18(1), 2--19 (1974)
[8]
Bennett, B.T., Kruskal, V.J.: LRU stack processing. IBM Journal of Research and Development, 19(4), 353--357 (1975)
[9]
Ben-Or M. Lower bounds for algebraic decision trees. 15th ACM Symposium on Theory of Computing, (1983), 80--86
[10]
Bilardi, G., Ekanadham, K., Pattnaik, P.: On approximating the ideal random access machine by physical machines. Journal of the ACM, 56(5), (2009)
[11]
Bilardi, G., Ekanadham, K., Pattnaik, P.: Efficient stack distance computation for a class of priority replacement policies. International Journal of Parallel Programming, 41(3), 430--468 (2013)
[12]
Bilardi, G., Versaci, F.: Optimal eviction policies for stochastic address traces. Theoretical Computer Science-B, 514, 36--60 (2013)
[13]
Boppana, R., B.: The decision-tree complexity of element distinctness. Information Processing Letters, 52, 329--331, (1994)
[14]
Borodin, A, El-Yaniv, R.: Online computation and competitive analysis Cambridge University Press, Cambridge UK (1998)
[15]
Cohen, A., Burkhard, W.A.: A proof of the optimality of the MIN paging algorithm using linear programming duality. Operations Research Letters, 18(1), 7--13, (1995)
[16]
Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C: Introduction to algorithms (third edition). The MIT Press (2009)
[17]
Denning, P.J.: Real time generation of MIN distance strings. Computer Science Department, Purdue University CSD TR - 211, November 1976.
[18]
Dobkin, D., Lipton R., J.: A lower bound of (1/2) n2 on linear search tree programs for the knapsack problem. J. of Computer and System Sciences, 16, 413--417, (1978)
[19]
Fotheringham, J.: Dynamic storage allocation in the atlas computer, including an automatic use of a backing store. Communication of the ACM, 4(10), 435--436 (1961)
[20]
Guo, J., Garzarán, M.J., Padua, D.: The power of Belady's algorithm in register allocation for long basic blocks. Proc. 16th International Workshop on Languages and Compilers for Parallel Computing, (2003), 374--390
[21]
Hennessy, J.L., Patterson, D.A.: Computer architecture: a quantitative approach. Morgan Kauffman (2006)
[22]
Lewis, C.H., Nelson, R.A.: Some one-pass algorithms for the generation of OPT distance strings. IBM T.J. Watson Research Center RC 4758, March 1974.
[23]
Lubiw, A., Rácz, A,: A lower bound for the integer distinctness problem. Information and Computation, 94, 83--92 (1991)
[24]
Mattson, R.L., Gecsei, J., Slutz, D.R., Traiger, I.L.: Evaluation techniques for storage hierarchies. IBM System Journal, 9(2), 78--117 (1970)
[25]
Misra, J., Gries,D.: Finding repeated elements. Science of Computer Programming, 2, 143--152 (1982)
[26]
Moran, S., Snir, M., Manber U.: Applications of Ramsey's Theorem to Decision Tree Complexity. Journal of the ACM, 32(4), 938--949 (1985)
[27]
Przybylski, S.: Cache and memory hierarchy design. A performance directed approach. Morgan Kaufmann, Palo Alto, CA (1990)
[28]
Savage, J.: Models of computation. Exploring the power of computing. Addison-Wesley, Reading, MA (1997)
[29]
Silberschatz, A, Galvin, P.B.,Gagne, G.: Operating system concepts. Wiley (2005)
[30]
Sleator D., Tarjan, R.E.: Amortized efficiency of list update and paging rules. Communication of the ACM, 28(2), 202--208 (1980)
[31]
Spirn, J.R., Denning, P.J.: Experiments with program locality. In Proc. AFIPS '72 (Fall, part I), 611--621 (1972)
[32]
Sugumar, R.A., Abraham, S.G.: Efficient simulation of caches under optimal replacement with application to miss characterization. ACM Sigmetrics Conference on Measurements and Modeling of Computer Systems, (1993), 24--35
[33]
Van Roy, B.: A short proof of optimality for the MIN cache replacement algorithm. Information Processing Letters, 102(2-3), 72--73, (2007)
[34]
Vogler, W.: Another short proof of optimality for the MIN cache replacement algorithm. Information Processing Letters, 10685), 219--220 (2008)
[35]
Wolfe, M.: High performance compilers for parallel computing. Addison-Wesley (1995)
[36]
Yao, A.C.: Lower bounds for algebraic computation trees with integer inputs. 30th IEEE Symposium on Foundations of Computer Science, (1989), 308--313

Cited By

View all
  • (2023)Increment - and - Freeze: Every Cache, Everywhere, All of the TimeProceedings of the 35th ACM Symposium on Parallelism in Algorithms and Architectures10.1145/3558481.3591085(129-139)Online publication date: 17-Jun-2023

Index Terms

  1. Optimal On-Line Computation of Stack Distances for MIN and OPT

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    CF'17: Proceedings of the Computing Frontiers Conference
    May 2017
    450 pages
    ISBN:9781450344876
    DOI:10.1145/3075564
    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: 15 May 2017

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. MIN
    2. Memory hierarchy
    3. OPT
    4. balanced trees
    5. element distinctness
    6. lower bounds
    7. on-line algorithms
    8. replacement policy
    9. stack distance

    Qualifiers

    • Research-article
    • Research
    • Refereed limited

    Conference

    CF '17
    Sponsor:
    CF '17: Computing Frontiers Conference
    May 15 - 17, 2017
    Siena, Italy

    Acceptance Rates

    CF'17 Paper Acceptance Rate 43 of 87 submissions, 49%;
    Overall Acceptance Rate 273 of 785 submissions, 35%

    Upcoming Conference

    CF '25

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)0
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 15 Feb 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2023)Increment - and - Freeze: Every Cache, Everywhere, All of the TimeProceedings of the 35th ACM Symposium on Parallelism in Algorithms and Architectures10.1145/3558481.3591085(129-139)Online publication date: 17-Jun-2023

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media