Extending STI for demanding hard-real-time systems

Software thread integration (STI) is a compilation technique which enables the efficient use of an application's fine-grain idle time on generic processors without special hardware support. With STI, a primary function (with real-time requirements on specific instructions) is automatically interleaved with a secondary function to create a single implicitly multithreaded function which minimizes context switching and hence both improves performance and also offers very fine-grain concurrency.In this paper we extend STI techniques to address two challenges. First, we reduce response time for interrupts or other high-priority threads by introducing polling servers into integrated threads. Currently integrated threads disable interrupts, delaying all other work until their completion. Second, we enable integration with long host threads, expanding the domain of STI. With current techniques, if there are frequent interrupts, only host threads which can finish execution before the next interrupt can be integrated. We derive methods to evaluate the response time for threads in systems with and without these new integration methods.We demonstrate these concepts with the integration of various threads in a sample hard-real-time system on a highly-constrained microcontroller. We use an inexpensive 20 MHz AVR 8-bit microcontroller to generate monochrome NTSC video while servicing a high-speed (115.2 kbaud) serial communication link. We have built and tested this system and demonstrate graphics rendering speed-ups of 3.99x to 13.5x.

[1]  Alan Burns,et al.  Applying new scheduling theory to static priority pre-emptive scheduling , 1993, Softw. Eng. J..

[2]  Alexander G. Dean,et al.  Compiling for fine-grain concurrency: planning and performing software thread integration , 2002, 23rd IEEE Real-Time Systems Symposium, 2002. RTSS 2002..

[3]  Bernhard Scholz,et al.  Register allocation for irregular architectures , 2002, LCTES/SCOPES '02.

[4]  Jay K. Strosnider,et al.  The Deferrable Server Algorithm for Enhanced Aperiodic Responsiveness in Hard Real-Time Environments , 1987, IEEE Trans. Computers.

[5]  Steven S. Muchnick,et al.  Advanced Compiler Design and Implementation , 1997 .

[6]  Gregory J. Chaitin,et al.  Register allocation and spilling via graph coloring , 2004, SIGP.

[7]  Wa Halang,et al.  REAL-TIME SYSTEMS .1. , 1990 .

[8]  Dharma P. Agrawal,et al.  A Framework for Enhancing Code Quality in Limited Register Set Embedded Processors , 2000, LCTES.

[9]  John Paul Shen,et al.  Techniques for software thread integration in real-time embedded systems , 1998, Proceedings 19th IEEE Real-Time Systems Symposium (Cat. No.98CB36279).

[10]  John Paul Shen,et al.  System-level issues for software thread integration: guest triggering and host selection , 1999, Proceedings 20th IEEE Real-Time Systems Symposium (Cat. No.99CB37054).

[11]  Joe D. Warren,et al.  The program dependence graph and its use in optimization , 1984, TOPL.

[12]  Alexander Dean,et al.  A High-Temperature Embedded Network Interface using Software Thread Integration , 1999 .

[13]  Timothy Kong,et al.  Precise register allocation for irregular architectures , 1998, Proceedings. 31st Annual ACM/IEEE International Symposium on Microarchitecture.

[14]  John Paul Shen,et al.  Hardware to software migration with real-time thread integration , 1998, Proceedings. 24th EUROMICRO Conference (Cat. No.98EX204).

[15]  Volker Barthelmann Inter-task register-allocation for static operating systems , 2002, LCTES/SCOPES '02.