Integrating task scheduling and cache locking for multicore real-time embedded systems

Modern embedded processors provide hardware support for cache locking, a mechanism used to facilitate the WCET (Worst-Case Execution Time) calculation of a task. We investigate the problem of integrating task scheduling and cache locking for a set of preemptible tasks with individual release times and deadlines on a multi-core processor with two-level caches. We propose a novel integrated approach that schedules the task set and allocates the locked cache contents of each task to the local caches (L1 caches) and the level-two cache (L2 cache). Our approach consists of three major components, the task scheduler, the L1 cache allocator, and the L2 cache allocator. The task scheduler aims at minimizing the number of task preemptions. The L1 cache allocator converts the interference graph of all the tasks scheduled on each core into a DAG by considering the preemptions between tasks and allocates the L1 cache space to each task. The L2 cache allocator converts the interference graph of all the tasks into a DAG by using a k-longest-path-based graph orientation algorithm and allocates the L2 cache space to each task. Both cache allocators significantly improve the cache utilization for all the caches due to the efficient use of the interference graphs of tasks. We have implemented our approach and compared it with the extended version of the preemption tree-based approach and the static analysis approach without cache locking by using a set of benchmarks from the MRTC WCET benchmark suite and SNU real-time benchmarks. Compared to the extended version of the preemption tree-based approach, the maximum WCRT (Worst Case Response Time) improvement of our approach is 15%. Compared to the static analysis approach, the maximum WCRT improvement of our approach is 37%.

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

[2]  Yun Liang,et al.  Timing analysis of concurrent programs running on shared cache multi-cores , 2009, 2009 30th IEEE Real-Time Systems Symposium.

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

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

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

[6]  Tulika Mitra,et al.  Integrated scratchpad memory optimization and task scheduling for MPSoC architectures , 2006, CASES '06.

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

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

[9]  Hui Wu,et al.  Scratchpad Memory aware task scheduling with minimum number of preemptions on a single processor , 2013, 2013 18th Asia and South Pacific Design Automation Conference (ASP-DAC).

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

[11]  Yun Liang,et al.  Shared cache aware task mapping for WCRT minimization , 2013, 2013 18th Asia and South Pacific Design Automation Conference (ASP-DAC).

[12]  Minming Li,et al.  Instruction cache locking for multi-task real-time embedded systems , 2011, Real-Time Systems.

[13]  Peter Marwedel,et al.  A synergetic approach to accurate analysis of cache-related preemption delay , 2011, 2011 Proceedings of the Ninth ACM International Conference on Embedded Software (EMSOFT).

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

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

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

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

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

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

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

[21]  Tulika Mitra,et al.  Exploring locking & partitioning for predictable shared caches on multi-cores , 2008, 2008 45th ACM/IEEE Design Automation Conference.

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

[23]  J. Ramanujam,et al.  A Framework for Task Scheduling and Memory Partitioning for Multi-Processor System-on-Chip , 2009, HiPEAC.