In multitask, preemptive real-time systems, the use of cache memories make difficult the estimation of the response time of tasks, due to the dynamic, adaptive and non-predictable behaviour of cache memories. But many embedded and critical applications need the increase of performance provided by cache memories. This work presents a comprehensive method to attain predictability on the use of caches in real-time systems. Locking cache mechanisms allow to load and lock the content of the cache to ensure it will remain unchanged during execution. By ensuring this, the cache is totally predictable and it allows a more accurate estimation of response time of tasks. In addition, conventional algorithms can be used to accomplish the schedulability analysis. Nowadays, locking cache scheme is present is several commercial processors, and only minor hardware modifications would be necessary in order to obtain the best performance. To select the contents to be preloaded in cache, a genetic algorithm has been developed. This algorithm selects the set of instructions to be locked in cache that give the better performance. It estimates a tight upperbound of the response time of tasks, making simultaneously the schedulability analysis. Experimental results indicate that this scheme is fully predictable, and the performance loss is negligible for around 60% of the tasks. In some cases, the estimated worst case performance using locking cache is better than using a standard cache. 1 INTRODUCTION Modern microprocessors include cache memories in its memory hierarchy to increase system performance. General-purpose systems directly benefit from this architectural improvement, but specific systems, like hard real-time systems, need special hardware resources and/or system analysis to guarantee the time correctness of system behaviour when cache memories are present. In multitask, preemtive real-time systems, response time of any task must be calculated a priori, in order to guarantee that all the tasks meets their deadlines. Using cache memories in such systems presents two problems, due to the dynamic, adaptive and non-predictable behaviour of cache memories. The first problem is to calculate the Worst Case Execution Time (WCET) due to the intra-task or intrinsic interference. Intra-task interference arises when a task removes its own instructions from cache due to conflict and capacity misses. When removed instructions are executed again, a cache miss increases the execution time of the task. This way, the delay caused by cache memory interference must be included in the WCET calculation. The second problem is to calculate the …
[1]
David E. Goldberg,et al.
Genetic Algorithms in Search Optimization and Machine Learning
,
1988
.
[2]
Alan C. Shaw,et al.
Reasoning About Time in Higher-Level Language Software
,
1989,
IEEE Trans. Software Eng..
[3]
D. B. Kirk,et al.
SMART (strategic memory allocation for real-time) cache design
,
1989,
[1989] Proceedings. Real-Time Systems Symposium.
[4]
Sang Lyul Min,et al.
An accurate worst case timing analysis technique for RISC processors
,
1994,
1994 Proceedings Real-Time Systems Symposium.
[5]
Andrew Wolfe,et al.
Software-based cache partitioning for real-time applications
,
1994
.
[6]
Andy J. Wellings,et al.
Adding instruction cache effect to an exact schedulability analysis of preemptive real-time systems
,
1996,
Proceedings of the Eighth Euromicro Workshop on Real-Time Systems.
[7]
Sharad Malik,et al.
Cache modeling for real-time software: beyond direct mapped instruction caches
,
1996,
17th IEEE Real-Time Systems Symposium.
[8]
Chang-Gun Lee,et al.
Enhanced analysis of cache-related preemption delay in fixed-priority preemptive scheduling
,
1996,
Proceedings Real-Time Systems Symposium.
[9]
장훈,et al.
[서평]「Computer Organization and Design, The Hardware/Software Interface」
,
1997
.
[10]
Andy J. Wellings,et al.
Hybrid instruction cache partitioning for preemptive real-time systems
,
1997,
Proceedings Ninth Euromicro Workshop on Real Time Systems.
[11]
Jochen Liedtke,et al.
OS-controlled cache predictability for real-time systems
,
1997,
Proceedings Third IEEE Real-Time Technology and Applications Symposium.
[12]
David B. Whalley,et al.
Bounding Pipeline and Instruction Cache Performance
,
1999,
IEEE Trans. Computers.
[13]
Reinhard Wilhelm,et al.
Cache Behavior Prediction by Abstract Interpretation
,
1996,
Sci. Comput. Program..
[14]
Antonio Martí,et al.
Combined Intrinsic-Extrinsic Cache Analysis for Preemptive Real-Time Systems
,
2000
.
[15]
Brani Vidakovic,et al.
USING GENETIC ALGORITHMS IN CONTENT SELECTION FOR LOCKING-CACHES
,
2001
.