skip to main content
research-article

Global Optimization of Fixed-Priority Real-Time Systems by RTOS-Aware Control-Flow Analysis

Authors Info & Claims
Published:02 January 2017Publication History
Skip Abstract Section

Abstract

Cyber--physical systems typically target a dedicated purpose; their embedded real-time control system, such as an automotive control unit, is designed with a well-defined set of functionalities. On the software side, this results in a large amount of implicit and explicit static knowledge about the system and its behavior already at compile time. Compilers have become increasingly better at extracting and exploiting such static knowledge. For instance, many optimizations have been lifted up to the interprocedural or even to the whole-program level. However, whole-program optimizations generally stop at the application--kernel boundary: control-flow transitions between different threads are not yet analyzed.

In this article, we cross the application--kernel boundary by combining the semantics of a real-time operating system (RTOS) with deterministic fixed-priority scheduling (e.g., OSEK/AUTOSAR, ARINC 653, μITRON, POSIX.4) and the explicit application knowledge to enable system-wide, flow-sensitive compiler optimizations. We present two methods to extract a cross-kernel, control-flow--graph that provides a global view on all possible execution paths of a real-time system. Having this knowledge at hand, we tailor the operating system kernel more closely to the particular application scenario. For the example of a real-world safety-critical control system, we present three possible use cases. (1) Runtime optimizations, by means of specialized system calls for each call site, allow one speed up the kernel execution path by 28% in our benchmark scenario. Furthermore, we target transient hardware fault tolerance with two automated software-based countermeasures: (2) generation of OS state assertions on the expected system behavior, and (3) a system-wide dominator-region based control-flow error detection, both of which leverage significant robustness improvements.

References

  1. Airlines Electronic Engineering Committee (AEEC). 2003. Avionics Application Software Standard Interface (ARINC Specification 653-1).Google ScholarGoogle Scholar
  2. Z. Alkhalifa, V. S. S. Nair, N. Krishnamurthy, and J. A. Abraham. 1999. Design and evaluation of system-level checks for on-line control flow error detection. IEEE Trans. Parallel Distrib. Syst. 10, 6 (June 1999), 627--641. DOI:http://dx.doi.org/10.1109/71.774911 Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Frances E. Allen. 1970. Control flow analysis. SIGPLAN Not. 5, 7 (July 1970), 1--19. DOI:http://dx.doi.org/10.1145/390013.808479 Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. AUTOSAR. 2013. Specification of Operating System (Version 5.1.0). Technical Report. Automotive Open System Architecture GbR.Google ScholarGoogle Scholar
  5. Volker Barthelmann. 2002. Inter-task register-allocation for static operating systems. In Proceedings of the Joint Conference on Languages, Compilers and Tools for Embedded Systems (LCTES/SCOPES’02). ACM, New York, 149--154. DOI:http://dx.doi.org/10.1145/513829.513855 Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. A. Benso, S. Di Carlo, G. Di Natale, P. Prinetto, and L. Tagliaferri. 2001. Control-flow checking via regular expressions. In Proceedings of the 10th Asian Test Symposium 2001 (ATS’01). IEEE, Washington, DC, 299--303. DOI:http://dx.doi.org/10.1109/ATS.2001.990300 Google ScholarGoogle ScholarCross RefCross Ref
  7. Ramon Bertran, Marisa Gil, Javier Cabezas, Victor Jimenez, Lluis Vilanova, Enric Morancho, and Nacho Navarro. 2006. Building a global system view for optimization purposes. In 2nd W’shop on the Interaction between Operating Systems and Computer Architecture (WIOSCA’06). IEEE, Washington, DC.Google ScholarGoogle Scholar
  8. Manfred Broy. 2006. Challenges in automotive software engineering. In Proceedings of the 28th International Conference on Software Engineering (ICSE’06). ACM, New York. 33--42. DOI:http://dx.doi.org/10.1145/1134285.1134292 Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Jim Cooling. 2003. Software Engineering for Real-Time Systems. Addison Wesley.Google ScholarGoogle Scholar
  10. Christian Dietrich, Martin Hoffmann, and Daniel Lohmann. 2015a. Back to the roots: Implementing the RTOS as a specialized state machine. In Proceedings of the 11th Annual Workshop on Operating Systems Platforms for Embedded Real-Time Applications (OSPERT’15). 7--12.Google ScholarGoogle Scholar
  11. Christian Dietrich, Martin Hoffmann, and Daniel Lohmann. 2015b. Cross-kernel control-flow-graph analysis for event-driven real-time systems. In Proceedings of the 2015 ACM SIGPLAN/SIGBED Conference on Languages, Compilers and Tools for Embedded Systems (LCTES’15). ACM, New York. DOI:http://dx.doi.org/10.1145/2670529.2754963 Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Christoph Erhardt, Michael Stilkerich, Daniel Lohmann, and Wolfgang Schröder-Preikschat. 2011. Exploiting static application knowledge in a Java compiler for embedded systems: A case study. In Proceedings of the 9th International Workshop on Java Technologies for Real-time 8 Embedded Systems. ACM, New York, 96--105. DOI:http://dx.doi.org/10.1145/2043910.2043927 Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. O. Goloubeva, M. Rebaudengo, M. S. Reorda, and M. Violante. 2003. Soft-error detection using control flow assertions. In Proceedings. of the18th IEEE International Symposium on Defect and Fault Tolerance in VLSI Systems. 581--588. DOI:http://dx.doi.org/10.1109/DFTVS.2003.1250158 Google ScholarGoogle ScholarCross RefCross Ref
  14. Martin Hoffmann, Florian Lukas, Christian Dietrich, and Daniel Lohmann. 2015. dOSEK: The design and implementation of a dependability-oriented static embedded kernel. In Proceedings of the 21st IEEE International Symposium on Real-Time and Embedded Technology and Applications (RTAS’15). IEEE, Washington, DC, 259--270. DOI:http://dx.doi.org/10.1109/RTAS.2015.7108449 Google ScholarGoogle ScholarCross RefCross Ref
  15. Yanhong Huang, Yongxin Zhao, Longfei Zhu, Qin Li, Huibiao Zhu, and Jianqi Shi. 2011. Modeling and verifying the code-level OSEK/VDX operating system with CSP. In Proceedings of the 5th International Symposium on Theoretical Aspects of Software Engineering (TASE’11). IEEE, Washington, DC, 142--149. DOI:http://dx.doi.org/10.1109/TASE.2011.11 Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. ISO 26262-4. 2011. ISO 26262-4:2011: Road vehicles -- Functional safety -- Part 4: Product Development at the System Level. ISO, Geneva, Switzerland.Google ScholarGoogle Scholar
  17. Richard Johnson, David Pearson, and Keshav Pingali. 1994. The program structure tree: Computing control regions in linear time. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI’94). ACM, New York, 171--185. DOI:http://dx.doi.org/10.1145/178243.178258 Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Kevin P. Lawton. 1996. Bochs: A portable PC emulator for Unix/X. Linux Journal 1996, 29es (1996), 7.Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Thomas Lengauer and Robert Endre Tarjan. 1979. A fast algorithm for finding dominators in a flowgraph. ACM Trans. Program. Lang. Syst. 1, 1 (1979), 121--141. DOI:http://dx.doi.org/10.1145/357062.357071 Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Peter Marwedel. 2006. Embedded System Design. Springer, Heidelberg, Germany.Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Dylan McNamee, Jonathan Walpole, Calton Pu, Crispin Cowan, Charles Krasic, Ashvin Goel, Perry Wagle, Charles Consel, Gilles Muller, and Renauld Marlet. 2001. Specialization tools and techniques for systematic optimization of system software. ACM 19, 2 (May 2001), 217--251. DOI:http://dx.doi.org/10.1145/377769.377778 Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. MISRA. 2004. Guidelines for the Use of the C Language in Critical Systems. ISBN 0 9524156 2 3.Google ScholarGoogle Scholar
  23. N. Oh, P. P. Shirvani, and E. J. McCluskey. 2002. Control-flow checking by software signatures. IEEE Transactions on Reliability 51, 1 (2002), 111--122. DOI:http://dx.doi.org/10.1109/24.994926 Google ScholarGoogle ScholarCross RefCross Ref
  24. OSEK/VDX Group. 2004. OSEK Implementation Language Specification 2.5. Technical Report. OSEK/VDX Group. Retrieved from http://portal.osek-vdx.org/files/pdf/specs/oil25.pdf.Google ScholarGoogle Scholar
  25. OSEK/VDX Group. 2005. Operating System Specification 2.2.3. Technical Report. OSEK/VDX Group. Retrieved from http://portal.osek-vdx.org/files/pdf/specs/os223.pdf.Google ScholarGoogle Scholar
  26. Reese T. Prosser. 1959. Applications of Boolean matrices to the analysis of flow diagrams. In Papers Presented at the December 1-3, 1959, Eastern Joint IRE-AIEE-ACM Computer Conference (IRE-AIEE-ACM’59 (Eastern)). ACM, New York, 133--138. DOI:http://dx.doi.org/10.1145/1460299.1460314 Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Calton Pu, Henry Massalin, and John Ioannidis. 1988. The synthesis kernel. Computing Systems 1, 1 (1988), 11--32.Google ScholarGoogle Scholar
  28. Fabian Scheler and Wolfgang Schröder-Preikschat. 2010. The RTSC: Leveraging the migration from event-triggered to time-triggered systems. In EDCC IEEE International Symposium on OO Real-Time Distributed Computing (ISORC’10). IEEE, Washington, DC, 34--41. DOI:http://dx.doi.org/10.1109/ISORC.2010.11 Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Horst Schirmeier, Martin Hoffmann, Christian Dietrich, Michael Lenz, Daniel Lohmann, and Olaf Spinczyk. 2015. FAIL*: An open and versatile fault-injection framework for the assessment of software-implemented hardware fault tolerance. In Proceedings of the 11th European Dependable Computing Conference (EDCC’15), Pierre Sens (Ed.). 245--255. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. O. Shivers. 1988. Control flow analysis in scheme. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI’88). ACM, New York, 164--174. DOI:http://dx.doi.org/10.1145/53990.54007 Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Hiroaki Takada and Ken Sakamura. 1995. μITRON for small-scale embedded systems. IEEE Micro 15, 6 (1995), 46--54. DOI:http://dx.doi.org/10.1109/40.476258 Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Peter Ulbrich, Rüdiger Kapitza, Christian Harkort, Reiner Schmid, and Wolfgang Schröder-Preikschat. 2011. I4Copter: An adaptable and modular quadrotor platform. In Proceedings of the 26th ACM Symposium on Applied Computing (SAC’11). ACM, New York, 380--396. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. R. Vemu and J. A. Abraham. 2008. Budget-dependent control-flow error detection. In Proceedings of the 14th IEEE International On-Line Testing Symposium (OLTS’08). 73--78. DOI:http://dx.doi.org/10.1109/IOLTS.2008.52 Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Libor Waszniowski and Zdenĕk Hanzálek. 2008. Formal verification of multitasking applications based on timed automata model. Real-Time Systems 38, 1 (Jan. 2008), 39--65. DOI:http://dx.doi.org/10.1007/s11241-007-9036-z Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. S. S. Yau and Fu-Chung Chen. 1980. An approach to concurrent control flow checking. IEEE TOSE SE-6, 2 (Mar 1980), 126--137. DOI:http://dx.doi.org/10.1109/TSE.1980.234478 Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Global Optimization of Fixed-Priority Real-Time Systems by RTOS-Aware Control-Flow Analysis

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          • Published in

            cover image ACM Transactions on Embedded Computing Systems
            ACM Transactions on Embedded Computing Systems  Volume 16, Issue 2
            Special Issue on LCETES 2015, Special Issue on ACSD 2015 and Special Issue on Embedded Devise Forensics and Security
            May 2017
            705 pages
            ISSN:1539-9087
            EISSN:1558-3465
            DOI:10.1145/3025020
            Issue’s Table of Contents

            Copyright © 2017 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 2 January 2017
            • Accepted: 1 May 2016
            • Revised: 1 January 2016
            • Received: 1 August 2015
            Published in tecs Volume 16, Issue 2

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article
            • Research
            • Refereed

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader