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.
- AUTOSAR. Specification of Operating System (Version 5.1.0). Tech. rep. Automotive Open System Architecture GbR, Feb. 2013.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
- 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 Scholar
Digital Library
- Jim Cooling. Software Engineering for Real-Time Systems. AW, 2003. ISBN: 0-201-59620-2. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- Guidelines for the Use of the C Language in Critical Systems (MISRAC: 2004). Oct. 2004. ISBN: 0-9524156-2-3.Google Scholar
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- Kevin P. Lawton. "Bochs: A Portable PC Emulator for Unix/X". In: Linux Journal 1996.29es (1996), p. 7. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- Peter Marwedel. Embedded System Design. Heidelberg, Germany: Springer, 2006. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
- 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 Scholar
Cross Ref
- Calton Pu, Henry Massalin, and John Ioannidis. "The Synthesis Kernel". In: Computing Systems 1.1 (1988), pp. 11--32.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
Index Terms
Cross-Kernel Control-Flow--Graph Analysis for Event-Driven Real-Time Systems
Recommendations
Global Optimization of Fixed-Priority Real-Time Systems by RTOS-Aware Control-Flow Analysis
Special Issue on LCETES 2015, Special Issue on ACSD 2015 and Special Issue on Embedded Devise Forensics and SecurityCyber--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 ...
Cross-Kernel Control-Flow--Graph Analysis for Event-Driven Real-Time Systems
LCTES'15: Proceedings of the 16th ACM SIGPLAN/SIGBED Conference on Languages, Compilers and Tools for Embedded Systems 2015 CD-ROMEmbedded 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 ...
Pushdown control-flow analysis for free
POPL '16Traditional control-flow analysis (CFA) for higher-order languages introduces spurious connections between callers and callees, and different invocations of a function may pollute each other's return flows. Recently, three distinct approaches have been ...







Comments