Skip to main content

MRU Cache Analysis for WCET Estimation

  • Chapter
  • First Online:
  • 879 Accesses

Abstract

Most previous work on cache analysis for WCET estimation assumes a particular replacement policy LRU. In contrast, much less work has been done for non-LRU policies, since they are generally considered to be very unpredictable. However, most commercial processors are actually equipped with these non-LRU policies, since they are more efficient in terms of hardware cost, power consumption, and thermal output, while still maintaining almost as good average-case performance as LRU.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD   54.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Notes

  1. 1.

    The name of the MRU replacement policy is inconsistent in the literature. Sometimes, this policy is called Pseudo-LRU because it can be seen as a kind of approximation of LRU. However, we use the name MRU to keep consistency with previous works in WCET research [26, 95], and to distinguish it from another Pseudo-LRU policy PLRU [96] which uses tree structures to store access history information.

  2. 2.

    The relative competitiveness can also be used as Must/May analysis to predict the cache access behavior at individual program points. However, this relies on the analysis under other policies with typically a much smaller cache sizes (to get 1-competitiveness), which generally yields very pessimistic results.

  3. 3.

    In realistic programs, loop structures are usually subject to certain restrictions (e.g., a natural loop has exactly one header node which is executed every time the loop iterates, and there is a path back to the header node [120]). However, the properties presented in this section are not specific to any particular structure, so we define a loop in a more generic way.

References

  1. R. Wilhelm, J. Engblom, A. Ermedahl, N. Holsti, S. Thesing, D. Whalley, G. Bernat, C. FerdinanRd, R. Heckmann, T. Mitra, F. Mueller, I. Puaut, P. Puschner, J. Staschulat, P. Stenström, 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)

    Google Scholar 

  2. Y.-T. Steven Li, S. Malik, Performance analysis of embedded software using implicit path enumeration, in DAC (ACM, New York, NY, 1995), pp. 456–461

    Google Scholar 

  3. H. Theiling, C. Ferdinand, R. Wilhelm, Fast and precise wcet prediction by separated cache and path analyses. Real-Time Syst. 18(2/3), 157–179 (2000). doi:10.1023/A:1008141130870. http://dx.doi.org/10.1023/A:1008141130870

    Article  Google Scholar 

  4. D. Grund, J. Reineke, Abstract interpretation of fifo replacement, in SAS (Springer, Berlin/Heidelberg, 2009), pp. 120–136

    Google Scholar 

  5. N. Guan, M. Lv, W. Yi, G. Yu, Wcet analysis with mru caches: Challenging lru for predictability. in RTAS, 2012, pp. 55–64

    Google Scholar 

  6. D. Grund, J. Reineke, Toward precise plru cache analysis, in WCET, 2010, pp. 23–35

    Google Scholar 

  7. C. Ferdinand, Cache behavior prediction for real-time systems. Ph.D. thesis, Universitat des Saarlandes, 1997

    Google Scholar 

  8. J. Reineke, D. Grund, C. Berg, R. Wilhelm, Timing predictability of cache replacement policies. Real-Time Syst. 37(2), 99–122 (2007). doi:10.1007/s11241-007-9032-3. http://dx.doi.org/10.1007/s11241-007-9032-3

    Article  MATH  Google Scholar 

  9. R. Wilhelm, D. Grund, J. Reineke, M. Schlickling, M. Pister, C. Ferdinand, Memory hierarchies, pipelines, and buses for future architectures in time-critical embedded systems. IEEE Trans. Comput. Aided Des. Integr. Circuits Syst. 28(7), 966–978 (2009)

    Article  Google Scholar 

  10. D. Grund, J. Reineke, Precise and efficient fifo-replacement analysis based on static phase detection, in ECRTS (IEEE Computer Society, Washington, DC, 2010), pp. 155–164

    Google Scholar 

  11. J. Hennessy, D. Patterson, Computer Architecture – A Quantitative Approach, 4th edn. (Morgan Kaufmann, San Francisco, 2007)

    Google Scholar 

  12. H. Al-Zoubi, A. Milenkovic, M. Milenkovic, Performance evaluation of cache replacement policies for the spec cpu2000 benchmark suite, in ACM-SE 42 (ACM, New York, NY, 2004), pp. 267–272

    Google Scholar 

  13. J. Reineke, Caches in wcet analysis – predictability, competitiveness, sensitivity. Ph.D. thesis, Saarland University, 2008

    Google Scholar 

  14. R. Heckmann, M. Langenbach, S. Thesing, R. Wilhelm, The influence of processor architecture on the design and the results of wcet tools, in Proceedings of the IEEE (2003)

    Google Scholar 

  15. A. Malamy, R.N. Patel, N.M. Hayes, Methods and apparatus for implementing a pseudo-lru cache memory replacement scheme with a locking feature. US Patent 5029072, 1994

    Google Scholar 

  16. A.S. Tanenbaum, Modern Operating Systems, 3rd edn. (Prentice Hall Press, Upper Saddle River, NJ, 2007)

    Google Scholar 

  17. D. Eklov, N. Nikoleris, D. Black-Schaffer, E. Hagersten, Cache pirating: measuring the curse of the shared cache, in ICPP (IEEE Computer Society, Washington, DC, 2011), pp. 165–175. doi:10.1109/ICPP.2011.15. http://dx.doi.org/10.1109/ICPP.2011.15

    Google Scholar 

  18. P. Kongetira, K. Aingaran, K. Olukotun, Niagara: a 32-way multithreaded sparc processor. IEEE Micro 25(2), 21–29 (2005)

    Article  Google Scholar 

  19. J. Reineke, D. Grund, Relative competitive analysis of cache replacement policies, in Proceedings of the 2008 ACM SIGPLAN-SIGBED Conference on Languages, Compilers, and Tools for Embedded Systems, LCTES ’08 (ACM, New York, NY, 2008), pp. 51–60

    Google Scholar 

  20. Y.-T.S. Li, S. Malik, A. Wolfe, Cache modeling for real-time software: beyond direct mapped instruction caches, in RTSS (IEEE Computer Society, Washington, DC, 1996), pp. 254–261

    Google Scholar 

  21. R.D. Arnold, F. Mueller, D.B. Whalley, M.G. Harmon, Bounding worst-case instruction cache performance, in RTSS (IEEE Computer Society, 1994), pp. 172–181

    Google Scholar 

  22. F. Mueller, Static cache simulation and its applications. Ph.D. thesis, Florida State University, 1994

    Google Scholar 

  23. F. Mueller, Timing analysis for instruction caches. Real-Time Syst. 18(2/3), 217–247 (2000). doi:10.1023/A:1008145215849. http://dx.doi.org/10.1023/A:1008145215849

    Article  Google Scholar 

  24. C. Ballabriga, H. Casse, Improving the first-miss computation in set-associative instruction caches, in ECRTS (IEEE Computer Society, Washington, DC, 2008), pp. 341–350

    Google Scholar 

  25. C. Cullmann, Cache persistence analysis: a novel approach theory and practice, in LCTES (ACM, New York, NY, 2011), pp. 121–130

    Google Scholar 

  26. C. Ferdinand, R. Wilhelm, On predicting data cache behavior for real-time systems, in Proceedings of the ACM SIGPLAN Workshop on Languages, Compilers, and Tools for Embedded Systems, LCTES ’98 (Springer, London, 1998), pp. 16–30

    Google Scholar 

  27. B.K. Huynh, L. Ju, A. Roychoudhury, Scope-aware data cache analysis for wcet estimation, in RTAS (IEEE Computer Society, Washington, DC, 2011), pp. 203–212

    Google Scholar 

  28. D. Hardy, I. Puaut, Wcet analysis of multi-level non-inclusive set-associative instruction caches, in RTSS (IEEE Computer Society, Washington, DC, 2008), pp. 456–466

    Google Scholar 

  29. T. Sondag, H. Rajan, A more precise abstract domain for multi-level caches for tighter wcet analysis, in RTSS (IEEE Computer Society, Washington, DC, 2010), pp. 395–404

    Google Scholar 

  30. Y. Li, V. Suhendra, Y. Liang, T. Mitra, A. Roychoudhury, Timing analysis of concurrent programs running on shared cache multi-cores, in RTSS (IEEE Computer Society, Washington, DC, 2009), pp. 57–67

    Google Scholar 

  31. S. Chattopadhyay, A. Roychoudhury, T. Mitra, Modeling shared cache and bus in multi-cores for timing analysis, in Proceedings of the 13th International Workshop on Software & Compilers for Embedded Systems, SCOPES ’10 (ACM, New York, NY, 2010), pp. 6:1–6:10

    Google Scholar 

  32. J. Staschulat, R. Ernst, Scalable precision cache analysis for real-time software, in ACM Transactions on Embedded Computing Systems, vol. 6, no. 4 (ACM, New York, 2007). doi:10.1145/1274858.1274863. http://doi.acm.org/10.1145/1274858.1274863

    Google Scholar 

  33. S. Altmeyer, C. Maiza, J. Reineke, Resilience analysis: tightening the crpd bound for set-associative caches, in LCTES (ACM, New York, NY, 2010), pp. 153–162

    Google Scholar 

  34. J. Reineke, D. Grund, Sensitivity of cache replacement policies, in ACM Transactions on Embedded Computing Systems, vol. 12 (ACM, New York, 2013), pp. 42:1–42:18. doi:10.1145/2435227.2435238. http://doi.acm.org/10.1145/2435227.2435238

    Google Scholar 

  35. P.P. Puschner, B. Alan, Guest editorial: a review of worst-case execution-time analysis. Real-Time Syst. 18(2/3), 115–128 (2000). http://dblp.uni-trier.de/db/journals/rts/rts18.html#PuschnerB00

    Article  Google Scholar 

  36. F.E. Allen, Control flow analysis, in Proceedings of Symposium on Compiler Optimization (ACM, New York, NY, 1970), pp. 1–19

    Book  Google Scholar 

  37. A.V. Aho, R. Sethi, J.D. Ullman, Compilers: Principles, Techniques, and Tools (Addison-Wesley Longman Publishing Co. Inc., Boston, MA, 1986)

    Google Scholar 

  38. J. Gustafsson, A. Betts, A. Ermedahl, B. Lisper, The mälardalen wcet benchmarks: past, present and future, in 10th International Workshop on Worst-Case Execution-Time Analysis, WCET’10, 2010

    Google Scholar 

  39. X. Li, Y. Liang, T. Mitra, A. Roychoudhury, Chronos: a timing analyzer for embedded software. Sci. Comput. Program. 69(1–3), 56–67 (2007). doi:10.1016/j.scico.2007.01.014. http://dx.doi.org/10.1016/j.scico.2007.01.014

    Article  MathSciNet  MATH  Google Scholar 

  40. T. Austin, E. Larson, D. Ernst, Simplescalar: an infrastructure for computer system modeling. Computer 35(2), 59–67 (2002)

    Article  Google Scholar 

  41. M. Lv, CATE: a simulator for cache analysis technique evaluation in WCET estimation (2012). Available from http://faculty.neu.edu.cn/ise/lvmingsong/cate/

    Google Scholar 

  42. M. Berkelaar, lp_solve: (mixed integer) linear programming problem solver (2003). Available from ftp://ftp.es.ele.tue.nl/pub/lp_solve

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing Switzerland

About this chapter

Cite this chapter

Guan, N. (2016). MRU Cache Analysis for WCET Estimation. In: Techniques for Building Timing-Predictable Embedded Systems. Springer, Cham. https://doi.org/10.1007/978-3-319-27198-9_2

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-27198-9_2

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-27196-5

  • Online ISBN: 978-3-319-27198-9

  • eBook Packages: EngineeringEngineering (R0)

Publish with us

Policies and ethics