On the Design and Evaluation of a Real-Time Operating System for Cache-Coherent Multicore Architectures

The uncontrolled use of the cache hierarchy in a multicore processor by real-time tasks may impact their worst-case execution times. Several operating system techniques have been recently proposed to deal with caches in a multiprocessor in order to improve predictability, such as cache partitioning, cache locking, and real-time scheduling. However, the contention caused by the cache coherence protocol and its implication for real-time tasks is still an open problem. In this paper, we present the design and evaluation of a real-time operating system for cache-coherent multicore architectures. The real-time operating system infrastructure includes real-time schedulers, cache partitioning, and cache coherence contention detection through hardware performance counters. We evaluate the real-time operating system in terms of run-time overhead, schedulability of realtime tasks, cache partitioning performance, and hardware performance counters usability. Our results indicate that: (i) a real-time operating system designed from scratch reduces the run-time overhead, and thus improves the realtime schedulability, when compared to a patched operating system; (ii) cache partitioning reduces the contention in the shared cache and provides safe real-time bounds; and (iii) hardware performance counters can detect when real-time tasks interfere with each other at the shared cache level. Scheduling, cache partitioning, and hardware performance counters together are a step-forward to provide real-time bounds in cache-coherent architectures.

[1]  Sanjoy K. Baruah,et al.  Priority-Driven Scheduling of Periodic Task Systems on Multiprocessors , 2003, Real-Time Systems.

[2]  Frank Mueller,et al.  Semi-Partitioned Hard-Real-Time Scheduling under Locked Cache Migration in Multicore Systems , 2012, 2012 24th Euromicro Conference on Real-Time Systems.

[3]  Giovani Gracioli,et al.  Real-time operating system support for multicore applications , 2014 .

[4]  Hennadiy Leontyev,et al.  LITMUS^RT : A Testbed for Empirically Comparing Real-Time Multiprocessor Schedulers , 2006, 2006 27th IEEE International Real-Time Systems Symposium (RTSS'06).

[5]  Antônio Augusto Fröhlich,et al.  Application oriented operating systems , 2001 .

[6]  James H. Anderson,et al.  An Empirical Comparison of Global, Partitioned, and Clustered Multiprocessor EDF Schedulers , 2010, 2010 31st IEEE Real-Time Systems Symposium.

[7]  James H. Anderson,et al.  Outstanding Paper Award: Making Shared Caches More Predictable on Multicore Platforms , 2013, 2013 25th Euromicro Conference on Real-Time Systems.

[8]  Frank Mueller,et al.  Predictable task migration for locked caches in multi-core systems , 2011, LCTES '11.

[9]  Ragunathan Rajkumar,et al.  Portable RK: a portable resource kernel for guaranteed and enforced timing behavior , 1999, Proceedings of the Fifth IEEE Real-Time Technology and Applications Symposium.

[10]  Antônio Augusto Fröhlich,et al.  Hardware Mediators: A Portability Artifact for Component-Based Systems , 2004, EUC.

[11]  Marco Caccamo,et al.  Real-time cache management framework for multi-core architectures , 2013, 2013 IEEE 19th Real-Time and Embedded Technology and Applications Symposium (RTAS).

[12]  Claudio Scordino,et al.  An EDF scheduling class for the Linux kernel ∗ , 2009 .

[13]  Frank Mueller,et al.  Static task partitioning for locked caches in multi-core real-time systems , 2012, CASES '12.

[14]  David K. Tam,et al.  Managing Shared L2 Caches on Multicore Systems in Software , 2007 .

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

[16]  Theodore P. Baker,et al.  An analysis of EDF schedulability on a multiprocessor , 2005, IEEE Transactions on Parallel and Distributed Systems.

[17]  Zhao Zhang,et al.  Gaining insights into multicore cache partitioning: Bridging the gap between simulation and real systems , 2008, 2008 IEEE 14th International Symposium on High Performance Computer Architecture.

[18]  Giovani Gracioli,et al.  An experimental evaluation of the cache partitioning impact on multicore real-time schedulers , 2013, 2013 IEEE 19th International Conference on Embedded and Real-Time Computing Systems and Applications.

[19]  James R. Larus,et al.  Making Pointer-Based Data Structures Cache Conscious , 2000, Computer.

[20]  Víctor Viñals,et al.  Improving the WCET computation in the presence of a lockable instruction cache in multitasking real-time systems , 2011, J. Syst. Archit..

[21]  Rabi N. Mahapatra,et al.  Fully associative cache partitioning with don't care bits for real-time applications , 2005, SIGBED.

[22]  Shinpei Kato,et al.  ExSched: An External CPU Scheduler Framework for Real-Time Systems , 2012, 2012 IEEE International Conference on Embedded and Real-Time Computing Systems and Applications.

[23]  James H. Anderson,et al.  On the Scalability of Real-Time Scheduling Algorithms on Multicore Platforms: A Case Study , 2008, 2008 Real-Time Systems Symposium.

[24]  Robert Tappan Morris,et al.  An Analysis of Linux Scalability to Many Cores , 2010, OSDI.

[25]  Björn B. Brandenburg,et al.  Feather-Trace : A Light-Weight Event Tracing Toolkit ∗ , 2007 .

[26]  Min Zhou,et al.  Experiences and lessons learned with a portable interface to hardware performance counters , 2003, Proceedings International Parallel and Distributed Processing Symposium.

[27]  Giovani Gracioli,et al.  On the Influence of Shared Memory Contention in Real-Time Multicore Applications , 2014, 2014 Brazilian Symposium on Computing Systems Engineering.

[28]  Sebastian Fischmeister,et al.  Implementation and evaluation of global and partitioned scheduling in a real-time OS , 2013, Real-Time Systems.

[29]  Xipeng Shen,et al.  Is Reuse Distance Applicable to Data Locality Analysis on Chip Multiprocessors? , 2010, CC.

[30]  Wang Yi,et al.  Cache-aware scheduling and analysis for multicores , 2009, EMSOFT '09.

[31]  James H. Anderson,et al.  A Hybrid Real-Time Scheduling Approach for Large-Scale Multicore Platforms , 2007, 19th Euromicro Conference on Real-Time Systems (ECRTS'07).

[32]  Yu Chen,et al.  Efficient shared cache management through sharing-aware replacement and streaming-aware insertion policy , 2009, 2009 IEEE International Symposium on Parallel & Distributed Processing.

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

[34]  Jan Reineke,et al.  CAMA: A Predictable Cache-Aware Memory Allocator , 2011, 2011 23rd Euromicro Conference on Real-Time Systems.

[35]  Giuseppe Lipari,et al.  Improved schedulability analysis of EDF on multiprocessor platforms , 2005, 17th Euromicro Conference on Real-Time Systems (ECRTS'05).

[36]  Sanjoy K. Baruah,et al.  Proportionate progress: a notion of fairness in resource allocation , 1993, STOC '93.

[37]  James H. Anderson,et al.  On the Design and Implementation of a Cache-Aware Multicore Real-Time Scheduler , 2009, 2009 21st Euromicro Conference on Real-Time Systems.

[38]  Sanjoy K. Baruah,et al.  A Categorization of Real-Time Multiprocessor Scheduling Problems and Algorithms , 2004, Handbook of Scheduling.

[39]  Jochen Liedtke,et al.  OS-controlled cache predictability for real-time systems , 1997, Proceedings Third IEEE Real-Time Technology and Applications Symposium.

[40]  Ragunathan Rajkumar,et al.  A Coordinated Approach for Practical OS-Level Cache Management in Multi-core Real-Time Systems , 2013, 2013 25th Euromicro Conference on Real-Time Systems.