Cache persistence analysis: Theory and practice

To compute a worst-case execution time (WCET) estimate for a program, the architectural effects of the underlying hardware must be modeled. For modern processors this results in the need for a cache and pipeline analysis. The timing-relevant result of the cache analysis is the categorization of the accesses to cached memory. Categorizations that are obtainable by the well-known must and may cache analysis [Ferdinand 1997] are always-hit, always-miss and not-classified. The cache persistence analysis tries to provide additional information for the not-classified case to limit the number of misses. There exists a cache persistence analysis by Ferdinand and Wilhelm based on abstract interpretation computing these classifications. In this article, we present a correctness issue with this analysis. To fix this issue, we propose two new abstract interpretation based persistence analyses and show their safety. One is based on the known may analysis and a second one on the concept of conflict counting. For fully timing compositional architectures [Wilhelm et al. 2009] the persistence information is straightforward to use. We will apply the concepts of persistence analysis for the first time to state-of-the-art architectures that exhibit both timing anomalies and domino effects. Such architectures do not allow the analyzer to quantify the costs of a single cache hit or miss in isolation. To make the usage of the persistence information feasible, we integrate the presented novel persistence analyses together with a novel path analysis approach into the industrially used WCET analyzer aiT.

[1]  Clément Ballabriga,et al.  Improving the First-Miss Computation in Set-Associative Instruction Caches , 2008, 2008 Euromicro Conference on Real-Time Systems.

[2]  Gernot Gebhard Timing Anomalies Reloaded , 2010, WCET.

[3]  Henrik Theiling,et al.  Reliable and Precise WCET Determination for a Real-Life Processor , 2001, EMSOFT.

[4]  K. Kavi Cache Memories Cache Memories in Uniprocessors. Reading versus Writing. Improving Performance , 2022 .

[5]  Bernd Becker,et al.  A Definition and Classification of Timing Anomalies , 2006, WCET.

[6]  Bronis R. de Supinski,et al.  Predicting Instruction Cache Behavior , 2015 .

[7]  Reinhard Wilhelm,et al.  Analysis of Loops , 1998, CC.

[8]  Frank Müller,et al.  Timing Analysis for Instruction Caches , 2000, Real-Time Systems.

[9]  Abhik Roychoudhury,et al.  Scope-Aware Data Cache Analysis for WCET Estimation , 2011, 2011 17th IEEE Real-Time and Embedded Technology and Applications Symposium.

[10]  Jan Reineke,et al.  Memory Hierarchies, Pipelines, and Buses for Future Architectures in Time-Critical Embedded Systems , 2009, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems.

[11]  Reinhard Wilhelm,et al.  Efficient and Precise Cache Behavior Prediction for Real-Time Systems , 1999, Real-Time Systems.

[12]  Andreas Ermedahl,et al.  A Modular Tool Architecture for Worst-Case Execution Time Analysis , 2008 .

[13]  Henrik Theiling,et al.  Fast and Precise WCET Prediction by Separated Cache and Path Analyses , 2000, Real-Time Systems.

[14]  Henrik Theiling,et al.  Control flow graphs for real-time systems analysis: reconstruction from binary executables and usage in ILP-based path analysis , 2002 .

[15]  Reinhard Wilhelm,et al.  An abstract interpretation-based timing validation of hard real-time avionics software , 2003, 2003 International Conference on Dependable Systems and Networks, 2003. Proceedings..

[16]  Naturwissenschaftlich-Technischen Fakult,et al.  Safe and Precise WCET Determination by Abstract Interpretation of Pipeline Models , 2004 .

[17]  Wang Yi,et al.  Combining Abstract Interpretation with Model Checking for Timing Analysis of Multicore Software , 2010, 2010 31st IEEE Real-Time Systems Symposium.

[18]  Frank Mueller,et al.  Static cache simulation and its applications , 1995 .

[19]  Jan Reineke,et al.  Timing predictability of cache replacement policies , 2007, Real-Time Systems.

[20]  Reinhard Wilhelm,et al.  Cache Behavior Prediction by Abstract Interpretation , 1996, Sci. Comput. Program..

[21]  Reinhold Heckmann,et al.  Computing the Worst Case Execution Time of an Avionics Program by Abstract Interpretation , 2007 .

[22]  David B. Whalley,et al.  Bounding Pipeline and Instruction Cache Performance , 1999, IEEE Trans. Computers.

[23]  Christian Ferdinand,et al.  Cache behavior prediction for real-time systems , 1997 .

[24]  Reinhard Wilhelm,et al.  The influence of processor architecture on the design and the results of WCET tools , 2003, Proceedings of the IEEE.

[25]  Jan Gustafsson,et al.  The Mälardalen WCET Benchmarks: Past, Present And Future , 2010, WCET.

[26]  Damien Hardy,et al.  WCET Analysis of Multi-Level Set-Associative Data Caches , 2009, WCET.

[27]  David B. Whalley,et al.  Integrating the timing analysis of pipelining and instruction caching , 1995, Proceedings 16th IEEE Real-Time Systems Symposium.

[28]  Reinhard Wilhelm,et al.  Improving the Precision of WCET Analysis by Input Constraints and Model-Derived Flow Constraints , 2012, Advances in Real-Time Systems.

[29]  Alan Jay Smith,et al.  Cache Memories , 1982, CSUR.

[30]  Pascal Sainrat,et al.  OTAWA, a Framework for Experimenting WCET Computations , 2006 .

[31]  R. Wilhelm,et al.  Predictability Considerations in the Design of Multi-Core Embedded Systems ∗ , 2010 .

[32]  Christoph Cullmann,et al.  Cache persistence analysis: a novel approachtheory and practice , 2011, LCTES '11.

[33]  Reinhold Heckmann,et al.  Software Structure and WCET Predictability , 2011, PPES.

[34]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[35]  Reinhard Wilhelm,et al.  Cache Behavior Prediction by Abstract Interpretation , 1996, SAS.

[36]  Per Stenström,et al.  Timing anomalies in dynamically scheduled microprocessors , 1999, Proceedings 20th IEEE Real-Time Systems Symposium (Cat. No.99CB37054).

[37]  Stephan Thesing,et al.  New Developments in WCET Analysis , 2006, Program Analysis and Compilation.