Skip to main content
Log in

Instruction cache locking for multi-task real-time embedded systems

  • Published:
Real-Time Systems Aims and scope Submit manuscript

Abstract

In a multi-task embedded system, a cache is shared by different tasks, which increases the complexity of cache management and the unpredictability of cache behavior. This unpredictability in turn brings an overestimation of application’s worst-case execution time (WCET) and worst-case CPU utilization (WCU) which are two of the most important criteria for real-time embedded systems. Modern processors often provide cache locking capability, which can be applied statically and dynamically to manage cache in a predictable manner. The selection of instructions to be locked in the instruction cache (I-Cache) has dramatic influence on the system performance. This paper focuses on applying cache locking techniques to the shared I-Cache to minimize WCU for multi-task embedded systems. We analyze and compare three different strategies to perform I-Cache locking: static locking, semi-dynamic locking, and dynamic locking. Different algorithms are proposed utilizing the foreknown information of embedded applications. Experimental results show that the proposed algorithms can reduce WCU compared to previous techniques.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Algorithm 1
Fig. 3
Algorithm 2
Algorithm 3
Fig. 4
Algorithm 4
Fig. 5
Fig. 6
Fig. 7

Similar content being viewed by others

References

  • Arnaud A, Puaut I (2006) Dynamic instruction cache locking in hard real-time systems. In: The 14th international conference on real-time and network systems

    Google Scholar 

  • Asaduzzaman A, Limbachiya N, Mahgoub I, Sibai FN (2007) Evaluation of I-Cache locking technique for real-time embedded systems. In: Innovations in information technology 2007, pp 342–346

    Chapter  Google Scholar 

  • Campoy AM, Ivars AP, Busquets-Mataix JV (2001b) Static use of locking caches in multitask, preemptive real-time systems. In: IEEE real-time embedded system workshop

    Google Scholar 

  • Campoy AM, Ivars AP, Busquets-Mataix JV (2001a) Using genetic algorithms in content selection for locking-caches. In: The international symposium on applied informatics, pp 271–276

    Google Scholar 

  • Campoy AM, Ivars AP, Rodriguez F, Busquets-Mataix JV (2003) Static use of locking caches vs dynamic use of locking caches for real-time systems. In: IEEE Canadian conference on electrical and computer engineering, pp 1283–1286

    Google Scholar 

  • Campoy AM, Puaut I, Ivars AP, Busquets-Mataix JV (2005) Cache contents selection for statically-locked instruction caches: an algorithm comparison. In: The 17th Euromicro conference on real-time systems, pp 49–56

    Google Scholar 

  • Campoy AM, Ivars AP, Busquets-Mataix JV (2007) Dynamic use of locking caches in multitask, preemptive real-time systems. In: The 15th world congress of the international federation of automatic control

    Google Scholar 

  • Chakraborty S, Mitra T, Roychoudhury A, Thiele L (2009) Cache-aware timing analysis of streaming applications. Real-Time Syst 41:52–85

    Article  MATH  Google Scholar 

  • Falk H, Plazar S, Theiling H (2007) Compile-time decided instruction cache locking using worst-case execution paths. In: The 5th IEEE/ACM international conference on CODES+ISSS07, pp 143–148

    Google Scholar 

  • Gordon-Ross A, Vahid F, Dutt N (2005) A first look at the interplay of code reordering and configurable caches. In: The 15th ACM Great Lakes symposium on VLSI, pp 416–421

    Chapter  Google Scholar 

  • Guillon C, Rastello F, Bidault T, Bouchez F (2004) Procedure placement using temporal-ordering information: dealing with code size expansion. J Embed Comput 1(4):437–459

    Google Scholar 

  • Kandemir M, Ramanujam J, Irwin MJ, Vijaykrishnan N, Kadayil I, Parikh A (2001) Dynamic management of scratchpad memory space. IN: DAC01, pp 690–695

    Google Scholar 

  • Lee C-G et al. (2001) Bounding cache-related preemption delay for real-time systems. IEEE Transactions on Software Engineering 27(9):805–826

    Article  Google Scholar 

  • Liu JWS (2000) Real-time systems. Prentice-Hall, New York, pp 40–41

    Google Scholar 

  • Liu T, Li M, Xue CJ (2009a) Instruction cache locking for real-time embedded systems with multi-tasks. In: RTCSA09, pp 494–499

  • Liu T, Li M, Xue CJ (2009b) Minimizing WCET for real-time embedded systems via static instruction cache locking. In: RTAS09, pp 35–44

    Google Scholar 

  • Puaut I, Decotigny D (2002) Low-complexity algorithms for static cache locking in multitasking hard real-time systems. In: RTSS02, pp 114–123

    Google Scholar 

  • Puaut I, Pais C (2007) Scratchpad memories vs locked caches in hard real-time systems: a quantitative comparison. In: DATE07, pp 1484–1489

    Google Scholar 

  • Udayakumaran S, Barua R (2003) Compiler-decided dynamic memory allocation for scratch-pad based embedded systems. In: The international conference on compilers, architectures and synthesis for embedded systems, pp 276–286

    Chapter  Google Scholar 

  • Zhao W, Whalley D, Healy C, Mueller F (2005) Improving WCET by applying a WC code-positioning optimization. ACM Trans Archit Code Optim 2(4):335–365

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Tiantian Liu.

Additional information

This paper is an extended version of the paper presented at RTCSA 2009: pp. 494–499.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Liu, T., Li, M. & Xue, C.J. Instruction cache locking for multi-task real-time embedded systems. Real-Time Syst 48, 166–197 (2012). https://doi.org/10.1007/s11241-011-9139-4

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11241-011-9139-4

Keywords

Navigation