Scheduling with compiler transformations: the TCEL approach

We present TCEL (Time-Constrained Event Language), which possesses rst-class timing constructs, and whose semantics is based on time-constrained relationships between observable events. Since the only timing constraints are imposed by observable events, the unobservable code can be automatically moved to achieve consistency between the program's worst-case execution time and its real-time requirements. Based on our initial success in applying compiler transformations to sequential programs, we present a task transformation technique for control domain applications driven by rate monotonic scheduling. 1 Overview The construction of a hard real-time system can, in practice, be a painful process. Many factors conspire to make this the case, among which are innexible scheduling paradigms and the lack of high-level programming language support. This last factor frequently forces programmers to use assembly language modules for some of the key components of their systems. Real-time performance is subsequently achieved by manually counting instruction-cycle times, hand-optimizing the code, and experimenting with various orderings of operations to help achieve schedulability. Recently, experimental languages have been proposed which provide rst-class, real-time constructs 6, 8, 10, 12, 14, 19]. An example of such a construct is \within 10ms do B," where the block of code \B" must be executed within 10 milliseconds. This constraint is, in turn, conveyed to the real-time scheduler as a directive. These languages, while providing a convenient framework for expressing time in programs, have done little to ease the process of translating a real-time specii-cation into schedulable code. Thus, their timing constructs have not been adopted in any production-level programming languages. On reason is that language constructs such as \within 10ms do B" establish constraints on blocks of code. However, \true" real-time properties establish constraints between the occurrences of events 2, 7]. These constraints typically arise from a requirements speciication, or from a detailed analysis of the application environment. While language-based constraints are very sensitive to a program's execution time, speciication-based constraints must be maintained regardless of the platform's CPU characteristics, memory cycle times, bus arbitration delays, etc. Our approach is to treat a real-time program as (1) an event-based, timing speciication, which represents the system's real-time requirements; and (2) a functional implementation, that is, the system's code. Instead of presenting \yet another" real-time programming language , we carry out this approach by using constructs quite similar to those found in the abovementioned languages. However, in our approach their interpretation is quite diierent. Instead of constraining blocks …

[1]  Satish K. Tripathi,et al.  Language support for the Maruti real-time system , 1990, [1990] Proceedings 11th Real-Time Systems Symposium.

[2]  B. Dasarathy,et al.  Timing Constraints of Real-Time Systems: Constructs for Expressing Them, Methods of Validating Them , 1989, IEEE Transactions on Software Engineering.

[3]  Alexander D. Stoyen,et al.  Real-Time Euclid: A language for reliable real-time systems , 1989, IEEE Transactions on Software Engineering.

[4]  Kwei-Jay Lin,et al.  Expressing and maintaining timing constraints in FLEX , 1988, Proceedings. Real-Time Systems Symposium.

[5]  John P. Lehoczky,et al.  The rate monotonic scheduling algorithm: exact characterization and average case behavior , 1989, [1989] Proceedings. Real-Time Systems Symposium.

[6]  Richard Gerber,et al.  Compiling real-time programs into schedulable code , 1993, PLDI '93.

[7]  Joseph A. Fisher,et al.  Trace Scheduling: A Technique for Global Microcode Compaction , 1981, IEEE Transactions on Computers.

[8]  Alan C. Shaw,et al.  Reasoning About Time in Higher-Level Language Software , 1989, IEEE Trans. Software Eng..

[9]  Alexander D. Stoyenko,et al.  Schedulability, Program Transformations and Real-Time Programming , 1991 .

[10]  Hideyuki Tokuda,et al.  Object-oriented real-time language design: constructs for timing constraints , 1990, OOPSLA/ECOOP '90.

[11]  Ron Cytron,et al.  Code motion of control structures in high-level languages , 1986, POPL '86.

[12]  Insup Lee,et al.  Supporting real-time concurrency , 1991 .

[13]  Aloysius K. Mok,et al.  Safety analysis of timing properties in real-time systems , 1986, IEEE Transactions on Software Engineering.