WCET-Aware Dynamic I-Cache Locking for a Single Task

Caches are widely used in embedded systems to bridge the increasing speed gap between processors and off-chip memory. However, caches make it significantly harder to compute the worst-case execution time (WCET) of a task. To alleviate this problem, cache locking has been proposed. We investigate the WCET-aware I-cache locking problem and propose a novel dynamic I-cache locking heuristic approach for reducing the WCET of a task. For a nonnested loop, our approach aims at selecting a minimum set of memory blocks of the loop as locked cache contents by using the min-cut algorithm. For a loop nest, our approach not only aims at selecting a minimum set of memory blocks of the loop nest as locked cache contents but also finds a good loading point for each selected memory block. We propose two algorithms for finding a good loading point for each selected memory block, a polynomial-time heuristic algorithm and an integer linear programming (ILP)-based algorithm, further reducing the WCET of each loop nest. We have implemented our approach and compared it to two state-of-the-art I-cache locking approaches by using a set of benchmarks from the MRTC benchmark suite. The experimental results show that the polynomial-time heuristic algorithm for finding a good loading point for each selected memory block performs almost equally as well as the ILP-based algorithm. Compared to the partial locking approach proposed in Ding et al. [2012], our approach using the heuristic algorithm achieves the average improvements of 33%, 15%, 9%, 3%, 8%, and 11% for the 256B, 512B, 1KB, 4KB, 8KB, and 16KB caches, respectively. Compared to the dynamic locking approach proposed in Puaut [2006], it achieves the average improvements of 9%, 19%, 18%, 5%, 11%, and 16% for the 256B, 512B, 1KB, 4KB, 8KB, and 16KB caches, respectively.

[1]  Gerard J. M. Smit,et al.  A mathematical approach towards hardware design , 2010, Dynamically Reconfigurable Architectures.

[2]  Steven Skiena,et al.  The Algorithm Design Manual , 2020, Texts in Computer Science.

[3]  Jean-François Deverge,et al.  WCET-Directed Dynamic Scratchpad Memory Allocation of Data , 2007, 19th Euromicro Conference on Real-Time Systems (ECRTS'07).

[4]  Henrik Theiling,et al.  Compile-time decided instruction cache locking using worst-case execution paths , 2007, 2007 5th IEEE/ACM/IFIP International Conference on Hardware/Software Codesign and System Synthesis (CODES+ISSS).

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

[6]  Hui Wu,et al.  WCET: aware dynamic instruction cache locking , 2014, LCTES '14.

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

[8]  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).

[9]  Mechthild Stoer,et al.  A simple min-cut algorithm , 1997, JACM.

[10]  Björn Lisper,et al.  Data cache locking for higher program predictability , 2003, SIGMETRICS '03.

[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]  Hui Wu,et al.  WCET-aware data selection and allocation for scratchpad memory , 2012, LCTES '12.

[13]  Tulika Mitra,et al.  Scratchpad allocation for concurrent embedded software , 2010, TOPL.

[14]  Minming Li,et al.  Minimizing WCET for Real-Time Embedded Systems via Static Instruction Cache Locking , 2009, 2009 15th IEEE Real-Time and Embedded Technology and Applications Symposium.

[15]  Xianfeng Li,et al.  Chronos: A timing analyzer for embedded software , 2007, Sci. Comput. Program..

[16]  Abhik Roychoudhury,et al.  Scope-Aware Data Cache Analysis for WCET Estimation , 2011, 2011 17th IEEE Real-Time and Embedded Technology and Applications Symposium.

[17]  Chun Jason Xue,et al.  Branch Prediction directed Dynamic instruction Cache Locking for embedded systems , 2013, 2013 IEEE 19th International Conference on Embedded and Real-Time Computing Systems and Applications.

[18]  Jens Knoop,et al.  Scratchpad memory allocation for data aggregates via interval coloring in superperfect graphs , 2010, TECS.

[19]  Minming Li,et al.  Instruction Cache Locking for Embedded Systems using Probability Profile , 2012, J. Signal Process. Syst..

[20]  Hui Wu,et al.  Dynamic Data-Cache Locking for Minimizing the WCET of a Single Task , 2017, ACM Trans. Embed. Comput. Syst..

[21]  Brani Vidakovic,et al.  USING GENETIC ALGORITHMS IN CONTENT SELECTION FOR LOCKING-CACHES , 2001 .

[22]  Rajeev Barua,et al.  Instruction-Cache Locking for Improving Embedded Systems Performance , 2015, ACM Trans. Embed. Comput. Syst..

[23]  Rajeev Barua,et al.  Instruction cache locking inside a binary rewriter , 2009, CASES '09.

[24]  Minming Li,et al.  Task Assignment with Cache Partitioning and Locking for WCET Minimization on MPSoC , 2010, 2010 39th International Conference on Parallel Processing.

[25]  Xianfeng Li,et al.  Modeling out-of-order processors for WCET analysis , 2006, Real-Time Systems.

[26]  Henrik Theiling,et al.  Fast and Precise WCET Prediction by Separated Cache and Path Analyses , 2000, Real-Time Systems.

[27]  Yun Liang,et al.  Instruction cache locking using temporal reuse profile , 2010, Design Automation Conference.

[28]  Yun Liang,et al.  WCET-centric partial instruction cache locking , 2012, DAC Design Automation Conference 2012.

[29]  Li Wang,et al.  Comparability Graph Coloring for Optimizing Utilization of Software-Managed Stream Register Files for Stream Processors , 2012, TACO.

[30]  Todd M. Austin,et al.  The SimpleScalar tool set, version 2.0 , 1997, CARN.

[31]  Matlab Matlab (the language of technical computing): using matlab graphics ver.5 , 2014 .

[32]  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.

[33]  Yun Liang,et al.  WCET-Centric dynamic instruction cache locking , 2014, 2014 Design, Automation & Test in Europe Conference & Exhibition (DATE).

[34]  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..

[35]  Peter Marwedel,et al.  WCET-aware static locking of instruction caches , 2012, CGO '12.

[36]  Jan Gustafsson,et al.  The Mälardalen WCET Benchmarks: Past, Present And Future , 2010, WCET.