Using SMT to Hide Context Switch Times of Large Real-Time Tasksets

Theoretical real-time research generally neglects context switch times. But in recent embedded applications which consist of dozens of threads with very short execution times, their impact is too serious to be ignored. We present a hard real-time scheduling algorithm that perfectly hides the context switch times of an arbitrary number of threads. It requires a Simultaneous Multithreaded (SMT) processor with at least two hardware thread slots and achieves a utilisation of 100%. The schedulability test is the same as for Earliest Deadline First (EDF) with a context switch time of zero. The hard real-time threads are executed alternately in the two slots of the processor. The inactive slot is used to unload the preceding thread context to memory and to load the subsequent thread context from memory. By hardware the active slot is completely isolated, in order to avoid any influence of the context switch on the execution of the active thread. This isolation is extensive, hence if further SMT thread slots are available, they can be used to execute threads with lower real-time demands. Even the context switch hardware can be re-used for them, enabling a very high throughput of mixed real-time task sets.

[1]  Lui Sha,et al.  Aperiodic task scheduling for Hard-Real-Time systems , 2006, Real-Time Systems.

[2]  Eric Rotenberg,et al.  Virtual multiprocessor: an analyzable, high-performance architecture for real-time computing , 2005, CASES '05.

[3]  Brad Calder,et al.  Balanced Multithreading: Increasing Throughput via a Low Cost Multithreading Hierarchy , 2004, 37th International Symposium on Microarchitecture (MICRO-37'04).

[4]  Francisco J. Cazorla,et al.  Predictable performance in SMT processors , 2004, CF '04.

[5]  Omri Serlin,et al.  Scheduling of time critical processes , 1899, AFIPS '72 (Spring).

[6]  Uwe Brinkschulte,et al.  Implementing Control Algorithms Within a Multithreaded Java Microcontroller , 2005, ARCS.

[7]  Donald Yeung,et al.  Transparent threads: resource sharing in SMT processors for high single-thread performance , 2002, Proceedings.International Conference on Parallel Architectures and Compilation Techniques.

[8]  Sascha Uhrig,et al.  IPC Control for Multiple Real-Time Threads on an In-Order SMT Processor , 2009, HiPEAC.

[9]  Nobuyuki Yamasaki,et al.  Prioritized SMT Architecture with IPC Control Method for Real-Time Processing , 2007, 13th IEEE Real Time and Embedded Technology and Applications Symposium (RTAS'07).

[10]  Sascha Uhrig,et al.  Exploiting spare resources of in-order SMT processors executing hard real-time threads , 2008, 2008 IEEE International Conference on Computer Design.

[11]  Amos R. Omondi,et al.  Performance of a context cache for a multithreaded pipeline , 1998, J. Syst. Archit..

[12]  Sascha Uhrig,et al.  How to Enhance a Superscalar Processor to Provide Hard Real-Time Capable In-Order SMT , 2010, ARCS.

[13]  Rohit Jain,et al.  Soft real-time scheduling on simultaneous multithreaded processors , 2002, 23rd IEEE Real-Time Systems Symposium, 2002. RTSS 2002..

[14]  Pascal Sainrat,et al.  An architecture for the simultaneous execution of hard real-time threads , 2008, 2008 International Conference on Embedded Computer Systems: Architectures, Modeling, and Simulation.

[15]  Stephen A. Edwards,et al.  Predictable programming on a precision timed architecture , 2008, CASES '08.

[16]  Eric Rotenberg,et al.  Virtual simple architecture (VISA): exceeding the complexity limit in safe real-time systems , 2003, ISCA '03.