Combining Prefetch with Instruction Cache Locking in Multitasking Real-Time Systems

In multitasking real-time systems it is required to compute the WCET of each task and also the effects of interferences between tasks in the worst case. This is complex with variable latency hardware usually found in the fetch path of commercial processors. Some methods disable cache replacement so that it is easier to model the cache behavior. Lock-MS is an ILP based method to obtain the best selection of memory lines to be locked in a dynamic locking instruction cache. In this paper we first propose a simple memory architecture implementing the next-line tagged prefetch, specially designed for hard real-time systems. Then, we extend Lock-MS to add support for hardware instruction prefetch. Our results show that the WCET of a system with prefetch and an instruction cache with size 5% of the total code size is better than that of a system having no prefetch and cache size 80% of the code. We also evaluate the effects of the prefetch penalty on the resulting WCET, showing that a system without prefetch penalties has a worst-case performance 95\% of the ideal case. This highlights the importance of a good prefetch design. Finally, the computation time of our analysis method is relatively short, analyzing tasks of 96 KB with 10^65 paths in less than 3 minutes.

[1]  Toby Walsh,et al.  Handbook of Constraint Programming , 2006, Handbook of Constraint Programming.

[2]  James E. Smith,et al.  A Performance Study of Instruction Cache Prefetching Methods , 1998, IEEE Trans. Computers.

[3]  Andy J. Wellings,et al.  Adding instruction cache effect to schedulability analysis of preemptive real-time systems , 1996, Proceedings Real-Time Technology and Applications.

[4]  Oh-Young Kwon,et al.  An improved lookahead instruction prefetching , 1997, Proceedings High Performance Computing on the Information Superhighway. HPC Asia '97.

[5]  V. Viñals,et al.  RR-09-01 ( 27 / 03 / 2009 ) Improving the use of instruction cache-locking methods in multitasking real-time systems , 2009 .

[6]  Todd C. Mowry,et al.  Cooperative prefetching: compiler and hardware support for effective instruction prefetching in modern processors , 1998, Proceedings. 31st Annual ACM/IEEE International Symposium on Microarchitecture.

[7]  Glenn Reinman,et al.  Fetch directed instruction prefetching , 1999, MICRO-32. Proceedings of the 32nd Annual ACM/IEEE International Symposium on Microarchitecture.

[8]  Sharad Malik,et al.  Cache modeling for real-time software: beyond direct mapped instruction caches , 1996, 17th IEEE Real-Time Systems Symposium.

[9]  Rolf Ernst,et al.  Scheduling analysis of real-time systems with precise modeling of cache related preemption delay , 2005, 17th Euromicro Conference on Real-Time Systems (ECRTS'05).

[10]  AbsInt Angewandte,et al.  Fast and Precise WCET Prediction by Separated Cache and Path Analyses , 1999 .

[11]  Isabelle Puaut,et al.  WCET-centric software-controlled instruction caches for hard real-time systems , 2006, 18th Euromicro Conference on Real-Time Systems (ECRTS'06).

[12]  A. Marti Campoy,et al.  DYNAMIC USE OF LOCKING CACHES IN MULTITASK, PREEMPTIVE REAL-TIME SYSTEMS , 2002 .

[13]  Chang-Gun Lee,et al.  Bounding Cache-Related Preemption Delay for Real-Time Systems , 2001, IEEE Trans. Software Eng..

[14]  Björn Lisper,et al.  Data cache locking for tight timing calculations , 2007, TECS.

[15]  Alan Jay Smith,et al.  Sequential Program Prefetching in Memory Hierarchies , 1978, Computer.

[16]  A. Perles,et al.  PERFORMANCE COMPARISON OF LOCKING CACHES UNDER STATIC AND DYNAMIC SCHEDULERS , 2003 .

[17]  M. Campoy,et al.  Static Use of Locking Caches in Multitask Preemptive Real-Time Systems , 2001 .

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

[19]  Víctor Viñals,et al.  Avoiding the WCET Overestimation on LRU Instruction Cache , 2008, 2008 14th IEEE International Conference on Embedded and Real-Time Computing Systems and Applications.

[20]  Per Stenström,et al.  An Integrated Path and Timing Analysis Method based on Cycle-Level Symbolic Execution , 1999, Real-Time Systems.

[21]  F. Rodriguez,et al.  Static use of locking caches vs. dynamic use of locking caches for real-time systems , 2003, CCECE 2003 - Canadian Conference on Electrical and Computer Engineering. Toward a Caring and Humane Technology (Cat. No.03CH37436).

[22]  Isabelle Puaut,et al.  Low-complexity algorithms for static cache locking in multitasking hard real-time systems , 2002, 23rd IEEE Real-Time Systems Symposium, 2002. RTSS 2002..

[23]  Alan Burns,et al.  Real Time Scheduling Theory: A Historical Perspective , 2004, Real-Time Systems.