ABSTRACT
We propose a novel high-level abstraction for real-time control, called Proper Timed I/O (PTIO). The abstraction allows user-space programs running on a stock operating system (without real-time extensions) to perform high-resolution real-time digital I/O (setting pins high or low, responding to input transitions, etc.). PTIO programs express their real-time I/O behavior in terms of a timed automaton that can communicate with the user-space program. Simple behaviors are encoded in the timed automaton; complex behaviors are implemented by the user-space program. We present two implementations of the PTIO abstraction, both for Linux. One utilizes a deterministic co-processor that is available on some ARM-based system-on-a-chip processors. This implementation can achieve timing accuracy of 100ns or better and can perform millions of finite-state transitions per second. The other implementation uses hardware timers that are available on every system-on-a-chip; it achieves a timing accuracy of 6µs or better, but it is limited to about 2000 state transitions per second. Both implementations guarantee that the PTIO never fails silently: if the mechanism missed a deadline, the user space program is always notified. In many cases, PTIOs eliminate the need for bare-metal programming or for specialized real-time operating systems.
- K. Altisen and S. Tripakis. Implementation of timed automata: An issue of semantics or modeling? In Formal Modeling and Analysis of Timed Systems, pages 273--288. Springer, 2005. Google ScholarDigital Library
- R. Alur and D. L. Dill. A theory of timed automata. Theoretical computer science, 126(2):183--235, 1994. Google ScholarDigital Library
- T. Amnell, E. Fersman, P. Pettersson, W. Yi, and H. Sun. Code synthesis for timed automata. Nordic Journal of Computing, 9(4):269--300, 2002. Google ScholarDigital Library
- G. V. Bochmann. Finite state description of communication protocols. Computer Networks, 2(4):361--372, 1978.Google Scholar
- M. Buettner, G. V. Yee, E. Anderson, and R. Han. X-MAC: a short preamble MAC protocol for duty-cycled wireless sensor networks. In Proceedings of the 4th International Conference on Embedded Networked Sensor Systems (SenSys), pages 307--320, 2006. Google ScholarDigital Library
- S. Cass. Tools toys: Hardware for your software radio. IEEE Spectrum, 43(10):51--54, Oct 2006. Google ScholarDigital Library
- M. De Wulf, L. Doyen, and J.-F. Raskin. Almost ASAP semantics: From timed models to timed implementations. In Hybrid Systems: Computation and Control, pages 296--310. Springer, 2004.Google Scholar
- J. Degesys, I. Rose, A. Patel, and R. Nagpal. DESYNC: self-organizing desynchronization and TDMA on wireless sensor networks. In Proceedings of the 6th International Conference on Information Processing in Sensor Networks (SenSys), pages 11--20, 2007. Google ScholarDigital Library
- C. Edwards. Not-so-humble raspberry PI gets big ideas. Engineering Technology, 8(3):30--33, April 2013.Google ScholarCross Ref
- L. M. Feeney, L. Andersson, A. Lindgren, S. Starborg, and A. Ahlberg Tidblad. A testbed for measuring battery discharge behavior. In Proceedings of the 7th ACM International Workshop on Wireless Network Testbeds, Experimental Evaluation and Characterization, pages 91--92, 2012. Google ScholarDigital Library
- P. Gerum. The xenomai project: Implementing a RTOS emulation framework on GNU/Linux. In Proceedings of the 3rd Real-Time Linux Workshop, 2001.Google Scholar
- T. Gleixner and D. Niehaus. Hrtimers and beyond: Transforming the Linux time subsystems. In Proceedings of the Linux Symposium, volume 1, pages 333--346, Ottawa, 2006.Google Scholar
- T. A. Henzinger, X. Nicollin, J. Sifakis, and S. Yovine. Symbolic model checking for real-time systems. Information and computation, 111(2):193--244, 1994. Google ScholarDigital Library
- D. Hildebrand. An architectural overview of QNX. In Proceeings of the USENIX Workshop on Microkernels and Other Kernel Architectures, pages 113--126, 1992. Google ScholarDigital Library
- IEEE. IEEE std 1003.1b-1993, 1994. IEEE Standard for Information Technology - Portable Operating System Interfaces (POSIX(R)) - Part 1: System Application Program Interface (API) - Amendment 1: Realtime Extension {C language}.Google Scholar
- R. Lim, F. Ferrari, M. Zimmerling, C. Walser, P. Sommer, and J. Beutel. Flocklab: A testbed for distributed, synchronized tracing and profiling of wireless embedded systems. In Proceedings of the 12th International Conference on Information Processing in Sensor Networks (SenSys), pages 153--166, 2013. Google ScholarDigital Library
- D. Molloy. Exploring Beaglebone. Wiley, 2014.Google Scholar
- A. Pnueli, E. Asarin, O. Maler, and J. Sifakis. Controller synthesis for timed automata. In Proceedings of the IFAC Symposium on System Structure and Control, pages 469--474, 1998.Google Scholar
- M. A. Rivas and M. G. Harbour. MaRTE OS: An Ada kernel for real-time embedded applications. In Proceedings of Reliable Software Technologies---Ada-Europe, pages 305--316. Springer, 2001. Google ScholarDigital Library
- W. River. VxWorks hompage, Accessed Dec 2014. Available online at http://www.windriver.com/products/vxworks/.Google Scholar
- O. Sankur, P. Bouyer, N. Markey, and P.-A. Reynier. Robust controller synthesis in timed automata. In CONCUR-- Concurrency Theory, pages 546--560. Springer, 2013. Google ScholarDigital Library
- S. Savage and H. Tokuda. Real time-Mach timers: Exporting time to the user. In Proceedings of the USENIX Mach Symposium, pages 111--118, 1993. Google ScholarDigital Library
- T. Ts'o, D. Hart, and J. Kacur. Real-time Linux wiki, Accessed Dec 2014. Available online at https://rt.wiki.kernel.org/.Google Scholar
Index Terms
- Proper Timed I/O: High-Accuracy Real-Time Control for Conventional Operating Systems
Recommendations
Proper timed I/O: high-accuracy real-time control for conventional operating systems
SYSTOR '15: Proceedings of the 8th ACM International Systems and Storage ConferenceOur work proposes a novel high-level abstraction for real-time control, called Proper Timed I/O (PTIO). The abstraction allows user-space programs running on an embedded system with a stock operating system (without real-time extensions) to perform high-...
Predictable programming on a precision timed architecture
CASES '08: Proceedings of the 2008 international conference on Compilers, architectures and synthesis for embedded systemsIn a hard real-time embedded system, the time at which a result is computed is as important as the result itself. Modern processors go to extreme lengths to ensure their function is predictable, but have abandoned predictable timing in favor of average-...
Calculating WCET estimates from timed traces
Real-time systems engineers face a daunting duty: they must ensure that each task in their system can always meet its deadline. To analyse schedulability they must know the worst-case execution time (WCET) of each task. However, determining exact WCETs ...
Comments