## Abstract

We study the smoothness of paging algorithms. How much can the number of page faults increase due to a perturbation of the request sequence? We call a paging algorithm *smooth* if the maximal increase in page faults is proportional to the number of changes in the request sequence. We also introduce quantitative smoothness notions that measure the smoothness of an algorithm. We derive lower and upper bounds on the smoothness of deterministic and randomized demand-paging and competitive algorithms. Among strongly-competitive deterministic algorithms, LRU matches the lower bound, while FIFO matches the upper bound. Well-known randomized algorithms such as Partition, Equitable, or Mark are shown not to be smooth. We introduce two new randomized algorithms, called Smoothed-LRU and LRU-Random. Smoothed-LRU allows sacrificing competitiveness for smoothness, where the trade-off is controlled by a parameter. LRU-Random is at least as competitive as any deterministic algorithm but smoother.

## Keywords

Paging Caching Smoothness Online algorithms Real-time systems## References

- 1.Achlioptas, D., Chrobak, M., Noga, J.: Competitive analysis of randomized paging algorithms. Theoretical Comput. Sci.
**234**(1-2), 203–218 (2000). https://doi.org/10.1016/S0304-3975(98)00116-9. http://www.sciencedirect.com/science/article/pii/S0304397598001169 MathSciNetCrossRefzbMATHGoogle Scholar - 2.Aho, A., Denning, P., Ullman, J.: Principles of optimal page replacement. J. ACM
**18**(1), 80–93 (1971)MathSciNetCrossRefzbMATHGoogle Scholar - 3.Axer, P., et al.: Building timing predictable embedded systems. ACM Trans. Embed. Comput. Syst.
**13**(4), 82:1–8:372 (2014). https://doi.org/10.1145/2560033 CrossRefGoogle Scholar - 4.Becchetti, L., Leonardi, S., Marchetti-Spaccamela, A., Schäfer, G., Vredeveld, T.: Average-case and smoothed competitive analysis of the multilevel feedback algorithm. Math. Oper. Res.
**31**(1), 85–108 (2006). https://doi.org/10.1287/moor.1050.0170 MathSciNetCrossRefzbMATHGoogle Scholar - 5.Beckmann, N., Sanchez, D.: Talus: a Simple Way to Remove Cliffs in Cache Performance. In: 21St IEEE International Symposium on High Performance Computer Architecture, HPCA 2015, Burlingame, CA, USA, February 7-11, 2015, pp. 64–75 (2015). https://doi.org/10.1109/HPCA.2015.7056022
- 6.Belady, L.A.: A study of replacement algorithms for virtual-storage computer. IBM Syst. J.
**5**(2), 78–101 (1966)CrossRefGoogle Scholar - 7.Borodin, A., El-Yaniv, R.: Online computation and competitive analysis. Cambridge University Press, New York (1998)zbMATHGoogle Scholar
- 8.Brodal, G.S., Moruz, G., Negoescu, A.: Onlinemin: a fast strongly competitive randomized paging algorithm. Theory Comput. Syst.
**56**(1), 22–40 (2015). https://doi.org/10.1007/s00224-012-9427-y MathSciNetCrossRefzbMATHGoogle Scholar - 9.Cazorla, F.J., et al.: PROARTIS: Probabilistically analyzable real-time systems. ACM Trans. Embed. Comput. Syst.
**12**(2s), 94:1–94:26 (2013). https://doi.org/10.1145/2465787.2465796 CrossRefGoogle Scholar - 10.Chaudhuri, S., Gulwani, S., Lublinerman, R.: Continuity and robustness of programs. Commun. ACM
**55**(8), 107–115 (2012). https://doi.org/10.1145/2240236.2240262 CrossRefzbMATHGoogle Scholar - 11.Doychev, G., et al.: CacheAudit: A tool for the static analysis of cache side channels. ACM Trans. Inf. Syst. Secur
**18**(1), 4:1–4:32 (2015). https://doi.org/10.1145/2756550 CrossRefGoogle Scholar - 12.Doyen, L., Henzinger, T., Legay, A., Nickovic, D.: Robustness of Sequential Circuits. In: ACSD ’10, pp 77–84 (2010). https://doi.org/10.1109/ACSD.2010.26
- 13.Dwork, C.: Differential privacy. In: Bugliesi, M., Preneel, B., Sassone, V., Wegener, I. (eds.) ICALP ’06, Part II, LNCS, vol. 4052, pp 1–12. Springer (2006). https://doi.org/10.1007/11787006_1
- 14.Fiat, A., Karp, R.M., Luby, M., McGeoch, L.A., Sleator, D.D., Young, N.E.: Competitive paging algorithms. J. Algorithms
**12**(4), 685–699 (1991)CrossRefzbMATHGoogle Scholar - 15.Kleene, S.: Automata studies, chap. Representation of events in nerve nets and finite automata. Princeton University Press, Princeton (1956)Google Scholar
- 16.Komm, D., Královic, R., Královic, R., Mömke, T.: Randomized online algorithms with high probability guarantees. In: STACS ’14, vol. 25, pp 470–481 (2014)Google Scholar
- 17.Koutsoupias, E., Papadimitriou, C.: Beyond competitive analysis. SIAM J. Comput.
**30**(1), 300–317 (2000). https://doi.org/10.1137/S0097539796299540 MathSciNetCrossRefzbMATHGoogle Scholar - 18.Liu, C.L.: Some memory aspects of finite automata. Tech. Rep. 411 Massachusetts Institute of Technology (1963)Google Scholar
- 19.Mattson, R.L., Gecsei, J., Slutz, D.R., Traiger, I.L.: Evaluation techniques for storage hierarchies. IBM Syst. J.
**9**(2), 78–117 (1970)CrossRefzbMATHGoogle Scholar - 20.McGeoch, L., Sleator, D.: A strongly competitive randomized paging algorithm. Algorithmica
**6**, 816–825 (1991). https://doi.org/10.1007/BF01759073 MathSciNetCrossRefzbMATHGoogle Scholar - 21.Motwani, R., Raghavan, P.: Randomized algorithms. Cambridge University Press, New York (1995)CrossRefzbMATHGoogle Scholar
- 22.Perles, M., Rabin, M., Shamir, E.: The theory of definite automata. IEEE Trans. Electron. Comput.
**12**(3), 233–243 (1963). https://doi.org/10.1109/PGEC.1963.263534 MathSciNetCrossRefzbMATHGoogle Scholar - 23.Raghavan, P., Snir, M.: Memory versus randomization in on-line algorithms (Extended Abstract). In: Ausiello, G., Dezani-Ciancaglini, M., Rocca, S.R.D. (eds.) ICALP ’89, Lecture Notes in Computer Science, vol. 372, pp 687–703. Springer (1989). https://doi.org/10.1007/BFb0035792
- 24.Reineke, J., Grund, D.: Sensitivity of cache replacement policies. ACM Trans. Embed. Comput. Syst.
**12**(1s), 42:1–42:18 (2013). https://doi.org/10.1145/2435227.2435238 CrossRefGoogle Scholar - 25.Reineke, J., Salinger, A.: On the smoothness of paging algorithms. In: Sanità, L., Skutella, M. (eds.) Approximation and Online Algorithms - 13th International Workshop, WAOA 2015, Patras, Greece, September 17-18, 2015. Revised Selected Papers, Lecture Notes in Computer Science, vol. 9499, pp 170–182. Springer (2015). https://doi.org/10.1007/978-3-319-28684-6_15
- 26.Sleator, D.D., Tarjan, R.E.: Amortized efficiency of list update and paging rules. Commun. ACM
**28**(2), 202–208 (1985)MathSciNetCrossRefGoogle Scholar - 27.Spielman, D.A., Teng, S.H.: Smoothed analysis of algorithms: why the simplex algorithm usually takes polynomial time. J. ACM
**51**(3), 385–463 (2004). https://doi.org/10.1145/990308.990310 MathSciNetCrossRefzbMATHGoogle Scholar - 28.Wilhelm, R., et al.: The worst-case execution-time problem—overview of methods and survey of tools. ACM Trans. Embed. Comput. Syst.
**7**(3), 36:1–36:53 (2008). https://doi.org/10.1145/1347375.1347389 CrossRefGoogle Scholar