skip to main content
tutorial

Cross-Kernel Control-Flow--Graph Analysis for Event-Driven Real-Time Systems

Authors Info & Claims
Published:04 June 2015Publication History
Skip Abstract Section

Abstract

Embedded real-time control systems generally have a dedicated purpose and fixed set of functionalities. This manifests in a large amount of implicit and explicit static knowledge, available already at compile time. Modern compilers can extract and exploit this information to perform extensive whole-program analyses and interprocedural optimizations. However, these analyses typically end at the application--kernel boundary, thus control-flow transitions between different threads are not covered, yet. This restriction stems from the pessimistic assumption of a probabilistic scheduling policy of the underlying operating system, impeding detailed predictions of the overall system behavior. Real-time operating systems, however, do provide deterministic and exactly specified scheduling decisions, as embedded control systems rely on a timely and precise behavior.

In this paper, we present an approach that incorporates the RTOS semantics into the control-flow analysis, to cross the application--kernel boundary. By combining operating system semantics, the static system configuration and the application logic, we determine 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, enables us to tailor the operating system kernel more closely to the particular application scenario. On the example of a real-world safety-critical control system, we present two possible use cases: Run-time optimizations, by means of specialized system calls for each call site, allow to speed up the kernel execution path by 33 percent in our benchmark scenario. An automated generation of OS state assertions on the expected system behavior, targeting transient hardware fault tolerance, leverages significant robustness improvements.

References

  1. AUTOSAR. Specification of Operating System (Version 5.1.0). Tech. rep. Automotive Open System Architecture GbR, Feb. 2013.Google ScholarGoogle Scholar
  2. Frances E. Allen. "Control Flow Analysis". In: SIGPLAN Not. 5.7 (July 1970), pp. 1--19. ISSN: 0362-1340. DOI: 10.1145/390013.808479. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Volker Barthelmann. "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). (Berlin, Germany). New York, NY, USA: ACM, 2002, pp. 149--154. ISBN: 1-58113-527-0. DOI: 10.1145/513829.513855. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. A Benso, S. Di Carlo, G. Di Natale, P. Prinetto, and L. Tagliaferri. "Control-flow checking via regular expressions". In: 10th Asian Test Symposium 2001 (ATS '01). (Kyoto, Japan). Washington, DC, USA: IEEE, 2001, pp. 299--303. DOI: 10.1109/ATS.2001.990300. Google ScholarGoogle ScholarCross RefCross Ref
  5. Ramon Bertran, Marisa Gil, Javier Cabezas, Victor Jimenez, Lluis Vilanova, Enric Morancho, and Nacho Navarro. "Building a Global System View for Optimization Purposes". In: W'shop on the Interaction between Operating Systems and Computer Architecture (SCAWIOSCA '06). (Boston, USA). Washington, DC, USA: IEEE, 2006.Google ScholarGoogle Scholar
  6. Manfred Broy. "Challenges in Automotive Software Engineering". In: 28th Int. Conf. on Software Engineering (ICSE '06). (Shanghai, China). New York, NY, USA: ACM, 2006, pp. 33--42. ISBN: 1-59593-375-1. DOI: 10.1145/1134285.1134292. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Jim Cooling. Software Engineering for Real-Time Systems. AW, 2003. ISBN: 0-201-59620-2. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Christoph Erhardt, Michael Stilkerich, Daniel Lohmann, and Wolfgang Schröder-Preikschat. "Exploiting Static Application Knowledge in a Java Compiler for Embedded Systems: A Case Study". In: JTRES '11: 9th Int. W'shop on Java Technologies for real-time & embedded systems. (York, UK). New York, NY, USA: ACM, Sept. 2011, pp. 96-- 105. ISBN: 978-1-4503-0731-4. DOI: 10.1145/2043910.2043927. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Guidelines for the Use of the C Language in Critical Systems (MISRAC: 2004). Oct. 2004. ISBN: 0-9524156-2-3.Google ScholarGoogle Scholar
  10. Martin Hoffmann, Florian Lukas, Christian Dietrich, and Daniel Lohmann. "dOSEK: The Design and Implementation of a Dependability-Oriented Static Embedded Kernel". In: 21st IEEE Int. Symp. on Real-Time and Embedded Technology and Applications (RTAS '15). Accepted. Washington, DC, USA: IEEE, 2015.Google ScholarGoogle ScholarCross RefCross Ref
  11. Yanhong Huang, Yongxin Zhao, Longfei Zhu, Qin Li, Huibiao Zhu, and Jianqi Shi. "Modeling and Verifying the Code-Level OSEK/VDX Operating System with CSP". In: 5th Int. Symp. on Theoretical Aspects of Software Engineering (TASE'11). (Xi'an, China). Washington, DC, USA: IEEE, 2011, pp. 142--149. DOI: 10.1109/TASE.2011.11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Kevin P. Lawton. "Bochs: A Portable PC Emulator for Unix/X". In: Linux Journal 1996.29es (1996), p. 7. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Thomas Lengauer and Robert Endre Tarjan. "A fast algorithm for finding dominators in a flowgraph". In: ACM Trans. Program. Lang. Syst. 1.1 (1979), pp. 121--141. ISSN: 0164-0925. DOI: 10.1145/357062.357071. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Peter Marwedel. Embedded System Design. Heidelberg, Germany: Springer, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Dylan McNamee, Jonathan Walpole, Calton Pu, Crispin Cowan, Charles Krasic, Ashvin Goel, Perry Wagle, Charles Consel, Gilles Muller, and Renauld Marlet. "Specialization Tools and Techniques for Systematic Optimization of System Software". In: ACM Trans. Comp. Syst. 19.2 (May 2001), pp. 217--251. ISSN: 0734-2071. DOI: 10.1145/377769.377778. URL: http://doi.acm.org/10.1145/377769.377778. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. OSEK/VDX Group. OSEK Implementation Language Specification 2.5. Tech. rep. http://portal.osek-vdx.org/files/pdf/specs/oil25.pdf, visited 2014-09-29. OSEK/VDX Group, 2004.Google ScholarGoogle Scholar
  17. OSEK/VDX Group. Operating System Specification 2.2.3. Tech. rep. http://portal.osek-vdx.org/files/pdf/specs/os223.pdf, visited 2014-09-29. OSEK/VDX Group, Feb. 2005.Google ScholarGoogle Scholar
  18. N. Oh, P.P. Shirvani, and E.J. McCluskey. "Control-flow checking by software signatures". In: IEEE Transactions on Reliability 51.1 (2002), pp. 111--122. ISSN: 0018-9529. DOI: 10.1109/24.994926.Google ScholarGoogle ScholarCross RefCross Ref
  19. Calton Pu, Henry Massalin, and John Ioannidis. "The Synthesis Kernel". In: Computing Systems 1.1 (1988), pp. 11--32.Google ScholarGoogle Scholar
  20. Fabian Scheler and Wolfgang Schröder-Preikschat. "The RTSC: Leveraging the Migration from Event-Triggered to Time-Triggered Systems". In: 13th IEEE Int. Symp. on OO Real-Time Distributed Computing (ISORC '10). (Carmona, Spain). Washington, DC, USA: IEEE, May 2010, pp. 34--41. ISBN: 978-0-7695-4037-5. DOI: 10.1109/ISORC.2010.11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Horst Schirmeier, Martin Hoffmann, Rüdiger Kapitza, Daniel Lohmann, and Olaf Spinczyk. "FAIL*: Towards a Versatile Fault-Injection Experiment Framework". In: 25th Int. Conf. on Architecture of Computing Systems (ARCS '12), Workshop Proceedings. (Munich, Germany). Ed. by Gero Mühl, Jan Richling, and Andreas Herkersdorf. Vol. 200. Lecture Notes in Informatics. Gesellschaft für Informatik, Mar. 2012, pp. 201--210. ISBN: 978-3-88579-294-9.Google ScholarGoogle Scholar
  22. O. Shivers. "Control Flow Analysis in Scheme". In: ACM SIGPLAN Conf. on Programming Language Design and Implementation (PLDI '88). (Atlanta, GA, USA). PLDI '88. New York, NY, USA: ACM, 1988, pp. 164--174. ISBN: 0-89791-269-1. DOI: 10.1145/53990.54007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Libor Waszniowski and Zdenek Hanzálek. "Formal Verification of Multitasking Applications Based on Timed Automata Model". In: Real-Time Systems 38.1 (Jan. 2008), pp. 39--65. ISSN: 0922-6443. DOI: 10.1007/s11241-007-9036-z. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. S.S. Yau and Fu-Chung Chen. "An Approach to Concurrent Control Flow Checking". In: IEEE TOSE SE-6.2 (1980), pp. 126--137. ISSN: 0098-5589. DOI: 10.1109/TSE.1980.234478. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Cross-Kernel Control-Flow--Graph Analysis for Event-Driven Real-Time Systems

          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

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader
          About Cookies On This Site

          We use cookies to ensure that we give you the best experience on our website.

          Learn more

          Got it!