TinyTimber, Reactive Objects in C for Real-Time Embedded Systems

Embedded systems are often operating under hard real-time constraints. Such systems are naturally described as time-bound reactions to external events, a point of view made manifest in the high-level programming and systems modeling language Timber. In this paper we demonstrate how the Timber semantics for parallel reactive objects translates to embedded real-time programming in C. This is accomplished through the use of a minimalistic Timber Run-Time system, TinyTimber (TT). The TT kernel ensures state integrity, and performs scheduling of events based on given time-bounds in compliance with the Timber semantics. In this way, we avoid the volatile task of explicitly coding parallelism in terms of processes/threads/semaphores/monitors, and side-step the delicate task to encode time-bounds into priorities. In this paper, the TT kernel design is presented and performance metrics are presented for a number of representative embedded platforms, ranging from small 8-bit to more potent 32- bit micro controllers. The resulting system runs on bare metal, completely free of references to external code (even C-lib) which provides a solid basis for further analysis. In comparison to a traditional thread based real-time operating system for embedded applications (FreeRTOS), TT has tighter timing performance and considerably lower code complexity. In conclusion, TinyTimber is a viable alternative for implementing embedded real-time applications in C today.

[1]  Per Lindgren,et al.  FIFO WiDOM: Timely control over wireless links , 2007, 2007 IEEE International Conference on Control Applications.

[2]  Theodore P. Baker,et al.  A stack-based resource allocation policy for realtime processes , 1990, [1990] Proceedings 11th Real-Time Systems Symposium.

[3]  Andrew P. Black,et al.  Reactive objects , 2002, Proceedings Fifth IEEE International Symposium on Object-Oriented Real-Time Distributed Computing. ISIRC 2002.

[4]  Johan Eriksson,et al.  A comprehensive approach to design of embedded real-time software for controlling mechanical systems , 2007 .

[5]  Frédéric Boussinot,et al.  The SugarCubes tool box: a reactive Java framework , 1998 .

[6]  Stephen A. Edwards,et al.  The synchronous languages 12 years later , 2003, Proc. IEEE.

[7]  Johan Nordlander,et al.  Reactive Objects and Functional Programming , 1999 .

[8]  Jukka Saarinen,et al.  Safety, liveness and real-time in embedded system design , 1999, J. Netw. Comput. Appl..

[9]  Magnus Carlsson,et al.  The Semantic Layers of Timber , 2003, APLAS.

[10]  Adam Dunkels,et al.  Contiki - a lightweight and flexible operating system for tiny networked sensors , 2004, 29th Annual IEEE International Conference on Local Computer Networks.

[11]  P. Lindgren,et al.  Robust Real-Time Applications in Timber , 2006, 2006 IEEE International Conference on Electro/Information Technology.

[12]  P Black Andrew,et al.  Timber: A Programming Language for Real-Time Embedded Systems , 2002 .