[Paper Review] WCET analysis of multi-level set-associative instruction caches
This paper proposes a safe, static worst-case execution time (WCET) analysis method for multi-level set-associative instruction caches in real-time embedded systems. Unlike prior work that was unsafe for set-associative caches, the method uses abstract interpretation to model cache behavior across multiple levels, ensuring safety and tightness by accounting for all possible access patterns, with experimental results showing significantly tighter WCET estimates and reasonable analysis times on real applications.
With the advent of increasingly complex hardware in real-time embedded systems (processors with performance enhancing features such as pipelines, cache hierarchy, multiple cores), many processors now have a set-associative L2 cache. Thus, there is a need for considering cache hierarchies when validating the temporal behavior of real-time systems, in particular when estimating tasks' worst-case execution times (WCETs). To the best of our knowledge, there is only one approach for WCET estimation for systems with cache hierarchies [Mueller, 1997], which turns out to be unsafe for set-associative caches. In this paper, we highlight the conditions under which the approach described in [Mueller, 1997] is unsafe. A safe static instruction cache analysis method is then presented. Contrary to [Mueller, 1997] our method supports set-associative and fully associative caches. The proposed method is experimented on medium-size and large programs. We show that the method is most of the time tight. We further show that in all cases WCET estimations are much tighter when considering the cache hierarchy than when considering only the L1 cache. An evaluation of the analysis time is conducted, demonstrating that analysing the cache hierarchy has a reasonable computation time.
Motivation & Objective
- To identify the safety flaws in existing multi-level cache WCET analysis methods, particularly for set-associative caches.
- To develop a safe and precise static analysis technique that supports set-associative and fully associative caches in multi-level cache hierarchies.
- To ensure WCET estimates are both safe (upper bounds) and tight (close to actual worst-case execution times).
- To evaluate the method’s precision and computational cost on real-world benchmarks, demonstrating its practicality for embedded real-time systems.
Proposed method
- The method extends existing abstract interpretation-based cache analysis to handle multi-level cache hierarchies, modeling each level as a separate analysis with filtered memory reference streams.
- It introduces a safe filtering mechanism that preserves all possible access behaviors by tracking uncertain accesses (U) that may hit or miss in higher-level caches.
- The approach uses fixpoint computation to analyze cache behavior, ensuring termination and soundness across all cache levels.
- It reuses an existing single-level cache analysis framework as a foundation, adapting it to handle hierarchical cache structures through reference stream propagation.
- The method supports arbitrary associativity degrees and replacement policies (e.g., LRU), making it widely applicable.
- It models the L2 cache analysis based on the subset of memory references that miss in the L1 cache, ensuring conservative yet precise estimation.
Experimental results
Research questions
- RQ1Under what conditions is the prior method for multi-level cache WCET analysis unsafe for set-associative caches?
- RQ2Can a static analysis method be designed that ensures safety for set-associative and fully associative multi-level caches?
- RQ3How does the precision of WCET estimation compare when analyzing the full cache hierarchy versus only the L1 cache?
- RQ4What is the computational overhead of analyzing multiple cache levels compared to single-level analysis?
Key findings
- The method produces safe WCET estimates for set-associative caches, resolving a critical safety flaw present in prior work [10].
- WCET estimates are significantly tighter when considering the full cache hierarchy compared to analyzing only the L1 cache, due to reduced pessimism from L2 cache hits.
- The analysis is precise in most cases, with tightness strongly dependent on the initial single-level cache analysis quality.
- The computation time for multi-level analysis remains reasonable, with L2 analysis time decreasing as L1 cache size increases due to effective filtering of memory references.
- The method is robust to replacement policies and supports arbitrary associativity levels, including fully associative caches.
- The method scales to multi-level hierarchies beyond two levels, though experiments were limited to L1 and L2 due to code availability.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.