ABSTRACT
Caches are notorious for their unpredictability. It is difficult or even impossible to predict if a memory access results in a definite cache hit or miss. This unpredictability is highly undesired for real-time systems. The Worst-Case Execution Time (WCET) of a software running on an embedded processor is one of the most important metrics during real-time system design. The WCET depends to a large extent on the total amount of time spent for memory accesses. In the presence of caches, WCET analysis must always assume a memory access to be a cache miss if it can not be guaranteed that it is a hit. Hence, WCETs for cached systems are imprecise due to the overestimation caused by the caches.
Modern caches can be controlled by software. The software can load parts of its code or of its data into the cache and lock the cache afterwards. Cache locking prevents the cache's contents from being flushed by deactivating the replacement. A locked cache is highly predictable and leads to very precise WCET estimates, because the uncertainty caused by the replacement strategy is eliminated completely.
This paper presents techniques exploring the lockdown of instruction caches at compile-time to minimize WCETs. In contrast to the current state of the art in the area of cache locking, our techniques explicitly take the worst-case execution path into account during each step of the optimization procedure. This way, we can make sure that always those parts of the code are locked in the I-cache that lead to the highest WCET reduction. The results demonstrate that WCET reductions from 54% up to 73% can be achieved with an acceptable amount of CPU seconds required for the optimization and WCET analyses themselves.
- AbsInt Angewandte Informatik GmbH. Worst-Case Execution Time Analyzer aiT for ARM. 2006.Google Scholar
- ARM920T Technical Reference Manual. Advanced RISC Machines Ltd., Literature Number ARM DDI 0151C, 2002.Google Scholar
- A. V. Aho, J. E. Hopcroft, and J. D. Ullman. Data Structures and Algorithms. Addison-Wesley, 1987. Google ScholarDigital Library
- A. M. Campoy, I. Puaut, A. P. Ivars, et al. Cache contents selection for statically-locked instruction caches: An Algorithm Comparison. In Proc. of ECRTS, July 2005. Google ScholarDigital Library
- H. Falk and P. Lokuciejewski. Design of a WCET-Aware C Compiler. In Proc. of ESTIMedia, Oct. 2006. Google ScholarDigital Library
- I. Puaut. WCET-centric Software-controlled Instruction Caches for Hard Real-Time Systems. In Proc. of ECRTS, July 2006. Google ScholarDigital Library
- I. Puaut and D. Decotigny. Low-Complexity Algorithms for Static Cache Locking in Multitasking Hard Real-Time Systems. In Proc. of RTSS, Dec. 2002. Google ScholarDigital Library
- X. Vera, B. Lisper, and J. Xue. Data Cache Locking for Higher Program Predictability. In Proc. of SIGMETRICS, June 2003. Google ScholarDigital Library
- L. Wehmeyer and P. Marwedel. Influence of Onchip Scratchpad Memories on WCET Prediction. In Proc. of WCET, June 2004.Google Scholar
- L. Wehmeyer and P. Marwedel. Influence of Memory Hierarchies on Predictability for Time Constrained Embedded Software. In Proc. of DATE, Mar. 2005. Google ScholarDigital Library
Index Terms
- Compile-time decided instruction cache locking using worst-case execution paths
Recommendations
Integrated instruction cache analysis and locking in multitasking real-time systems
DAC '13: Proceedings of the 50th Annual Design Automation ConferenceCache locking improves timing predictability at the cost of performance. We explore a novel approach that opportunistically employs both cache analysis and locking to enhance schedulability in preemptive multi-tasking real-time systems. The cache is ...
Instruction cache locking using temporal reuse profile
DAC '10: Proceedings of the 47th Design Automation ConferenceThe performance of most embedded systems is critically dependent on the average memory access latency. Improving the cache hit rate can have significant positive impact on the performance of an application. Modern embedded processors often feature cache ...
WCET-centric partial instruction cache locking
DAC '12: Proceedings of the 49th Annual Design Automation ConferenceCaches play an important role in embedded systems by bridging the performance gap between high speed processors and slow memory. At the same time, caches introduce imprecision in Worst-case Execution Time (WCET) estimation due to unpredictable access ...
Comments