The Evolution of Real-Time Programming

Real-time programming has always been one of the most challenging programming disciplines. Real-time programming requires comprehensive command of sequential programming, concurrency, and, of course, time. Real-time programming has many application domains. In this chapter, however, we structure our discussion around digital control systems for the following two reasons. Firstly, digital control systems represent a large portion of real-time software in a diverse set of industries. Examples include automotive power train control systems, aircraft flight control systems, electrical drive systems in paper mills, or process control systems in power plants and refineries. Many of these systems distribute their components over networks with significant communication delays. Therefore, we also discuss networked real-time programming (Section 7). The second reason is pedagogical. Digital control is defined by a set of abstractions that are real-time programmable and mathematically tractable in the context of the dynamics of physio-chemical processes. The abstractions clearly define what application engineers (control engineers) expect of real-time programming. These abstractions therefore constitute a precise definition of the real-time programming problem (Section 2). Control engineers design in difference equations and often use modeling tools such as Simulink to simulate and validate their control models. The part of Simulink most commonly used to specify digital control, i.e., discrete-time with the discrete fixed-step solver and mode:auto, is well-explained by the so-called synchronous semantics [7, 38]. The key abstraction, we call the synchronous abstraction, is that any computation and component interaction happens instantaneously in zero time or with a delay that is exactly the same at each invocation. For example, if a controller computes every 20 msec, either the controller is assumed to read its inputs, compute its control, and write the corresponding outputs instantaneously at the beginning of each period in zero time, or to read its inputs instantaneously at the beginning of the period, compute during the period, and write the corresponding output exactly 20 msec (one period) later. In control parlance, these are the causal and strictly causal cases, respectively. Systems of difference equations can directly be expressed and structured in this model. The inclusion of strictly causal components (components with delays of a period or more) is typically required to break feedback loops and to account for the unavoidable computation or communication delays that will be present in the real control system. Real-time programmers design in interrupt handlers, device drivers, and schedulers, which are concepts on levels of abstraction that are obviously unrelated to difference equations. The result is a conceptual and technical disconnect between control model and real-time code that bedevils many control building projects. The control engineer specifies a Simulink design the real-time programmer finds unimplementable. The realtime programmer then fills in gaps to produce an implementation the control engineer finds uncontrollable. The process of interaction as the two iterate to produce a correct design is prolonged by the different backgrounds of control engineers and real-time programmers. This gap explains many of today’s problems in real-time software design for digital control such as high validation and maintainance overhead as well as limited potential for reusability and scalability.

[1]  Lui Sha,et al.  Priority Inheritance Protocols: An Approach to Real-Time Synchronization , 1990, IEEE Trans. Computers.

[2]  D. Swaroop,et al.  String Stability Of Interconnected Systems: An Application To Platooning In Automated Highway Systems , 1997 .

[3]  Bruno Sinopoli,et al.  Kalman filtering with intermittent observations , 2004, IEEE Transactions on Automatic Control.

[4]  Thomas A. Henzinger,et al.  The embedded machine: predictable, portable real-time code , 2002, PLDI '02.

[5]  Thomas A. Henzinger,et al.  Giotto: a time-triggered language for embedded programming , 2001, Proc. IEEE.

[6]  Alberto L. Sangiovanni-Vincentelli,et al.  A hierarchical coordination language for interacting real-time tasks , 2006, EMSOFT '06.

[7]  Thomas A. Henzinger,et al.  Composable code generation for distributed giotto , 2005, LCTES '05.

[8]  Albert Benveniste,et al.  Compositionality in Dataflow Synchronous Languages: Specification and Distributed Code Generation , 2000, Inf. Comput..

[9]  Nicolas Halbwachs,et al.  Synchronous Programming of Reactive Systems , 1992, CAV.

[10]  Emilia Farcas,et al.  Transparent distribution of real-time components based on logical execution time , 2005, LCTES '05.

[11]  Sekhar Tatikonda,et al.  Control under communication constraints , 2004, IEEE Transactions on Automatic Control.

[12]  Marco Zennaro,et al.  Distributing synchronous programs using bounded queues , 2005, EMSOFT.

[13]  Thomas A. Henzinger,et al.  Schedule-Carrying Code , 2003, EMSOFT.

[14]  Reinhard Wilhelm,et al.  The influence of processor architecture on the design and the results of WCET tools , 2003, Proceedings of the IEEE.

[15]  Stavros Tripakis,et al.  Semantics-preserving and memory-efficient implementation of inter-task communication on static-priority or EDF schedulers , 2005, EMSOFT.

[16]  Thomas A. Henzinger,et al.  From control models to real-time code using Giotto , 2003 .

[17]  Hermann Kopetz,et al.  Real-time systems , 2018, CSC '73.

[18]  Pascal Raymond,et al.  The synchronous data flow programming language LUSTRE , 1991, Proc. IEEE.

[19]  Christoph M. Kirsch,et al.  Principles of Real-Time Programming , 2002, EMSOFT.

[20]  K. H. Kim,et al.  A Non-Blocking Buffer Mechanism for Real-Time Event Message Communication , 2006, Real-Time Systems.

[21]  Anant Sahai,et al.  Anytime information theory , 2001 .

[22]  T. Başar,et al.  A New Approach to Linear Filtering and Prediction Problems , 2001 .

[23]  Giorgio Buttazzo,et al.  Hard Real-Time Computing Systems: Predictable Scheduling Algorithms and Applications , 1997 .

[24]  Stavros Tripakis,et al.  From simulink to SCADE/lustre to TTA: a layered approach for distributed embedded applications , 2003, LCTES '03.

[25]  Duke Lee,et al.  Wireless Token Ring Protocol , 2001 .

[26]  Feng-Li Lian,et al.  Network design consideration for distributed control systems , 2002, IEEE Trans. Control. Syst. Technol..

[27]  Alan Burns,et al.  Real-Time Systems and Programming Languages , 2009 .

[28]  Josef Templ,et al.  TDL Specification and Report , 2004 .

[29]  Albert Benveniste,et al.  A Protocol for Loosely Time-Triggered Architectures , 2002, EMSOFT.

[30]  Thomas A. Henzinger,et al.  Time-Safety Checking for Embedded Programs , 2002, EMSOFT.

[31]  Stavros Tripakis,et al.  Defining and translating a "safe" subset of simulink/stateflow into lustre , 2004, EMSOFT '04.

[32]  Thomas A. Henzinger,et al.  Event-Driven Programming with Logical Execution Times , 2004, HSCC.

[33]  Gérard Berry,et al.  The foundations of Esterel , 2000, Proof, Language, and Interaction.

[34]  Insup Lee,et al.  Compositional real-time scheduling framework , 2004, 25th IEEE International Real-Time Systems Symposium.

[35]  James W. Layland,et al.  Scheduling Algorithms for Multiprogramming in a Hard-Real-Time Environment , 1989, JACM.