Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Applied static analysis and specialization of cross-core syscalls for multi-core AUTOSAR OS

Published: 03 October 2024 Publication History

Abstract

The development of static real-time control systems often follows a closed-world assumption, allowing extensive RTOS-aware whole-program optimization. For single-core systems, previous work could show the high potential of control-flow-aware static system-call tailoring. However, due to an exponential state explosion in the analysis phase, it cannot simply be extended to a multi-core setting, since the core’s relative timing to each other is undetermined. In this work, we present MultiSSE, a multi-core capable and RTOS-aware static whole-system optimization. First, MultiSSE analyzes the system by determining the relative positions of multiple cores only when necessary. For that, it exploits structural control flow and optionally timing information to handle each core separately as much as possible. Based on the analysis result, a synthesis applies lock elision and system-call optimization to generate specialized multi-core real-time systems for AUTOSAR OS. To enable a static prediction of the run-time reduction, we additionally provide cost models for the optimized cross-core system calls and evaluate the approach with synthetic benchmarks and a real-world quadrotor application. MultiSSE was able to optimize or even completely elide costly cross-core system calls and system objects leading to a reduction of up to 14% of a task’s execution time. In this extended version of a conference publication (Entrup et al. 2023), we provide an advanced description, new cost models, and an end-to-end measurement by developing a synthesis complementing the analysis.

References

[1]
AEEC (2015) Avionics Application Software Standard Interface (ARINC Specification 653P1-4)
[2]
AUTOSAR (2013) Specification of operating system (version 5.1.0). Technical report, Automotive Open System Architecture GbR
[3]
Barthelmann V (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), pp. 149–154. ACM Press, New York, NY, USA.
[4]
Béchennec J-L, Briday M, Faucou S, Trinquet Y (2006) Trampoline: An OpenSource implementation of the OSEK/VDX RTOS specification. In: IEEE Conference on Emerging Technologies and Factory Automation, 2006. ETFA ’06., pp. 62–69. IEEE Computer Society Press, Washington, DC, USA.
[5]
Bertran R, Gil M, Cabezas J, Jimenez V, Vilanova L, Morancho E, Navarro N (2006) Building a global system view for optimization purposes. In: Proceedings of the 2nd Workshop on the Interaction Between Operating Systems and Computer Architecture (WIOSCA ’06). IEEE Computer Society Press, Washington, DC, USA
[6]
Cooling J Software engineering for real-time systems 2003 New York Addison-Wesley
[7]
Dietrich C (2019) Interaction-aware analysis and optimization of real-time application and operating system. PhD thesis, Leibniz Universität Hannover. . https://www.repo.uni-hannover.de/handle/123456789/7306
[8]
Dietrich C, Hoffmann M, and Lohmann D Global optimization of fixed-priority real-time systems by RTOS-aware control-flow analysis ACM Trans Embedded Comput Syst 2017 16 2 35-13525
[9]
Dietrich C, Hoffmann M, Lohmann D (2015) 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 Press, New York, NY, USA .
[10]
Dietrich C, Lohmann D (2017) OSEK-V: Application-specific RTOS instantiation in hardware. In: Proceedings of the 2017 ACM SIGPLAN/SIGBED Conference on Languages, Compilers and Tools for Embedded Systems (LCTES ’17). ACM Press, New York, NY, USA.
[11]
Dietrich C, Lohmann D (2018) Semi-extended tasks: Efficient stack sharing among blocking threads. In: Altmeyer, S. (ed.) Proceedings of the 39th IEEE Real-Time Systems Symposium 2018. IEEE Computer Society Press, Nashville, Tennessee, USA .
[12]
Engler D, Ashcraft K (2003) Racerx: effective, static detection of race conditions and deadlocks. In: Proceedings of the 19th ACM Symposium on Operating Systems Principles (SOSP ’03), pp. 237–252. ACM Press, New York, NY, USA.
[13]
Entrup G, Fiedler B, Lohmann D (2023) MultiSSE: Static syscall elision and specialization for event-triggered multi-core RTOS. In: Proceedings of the 29th IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS’23)
[14]
Ermedahl A, Gustafsson J, Lisper B (2011) Deriving wcet bounds by abstract execution. In: ECRTS 2011
[15]
Fiedler B, Entrup G, Dietrich C, Lohmann D (2021) ARA: Static initialization of dynamically-created system objects. In: Proceedings of the 27th IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS’21), pp. 400–412 .
[16]
Glew A and Hwu W-M Snoopy cache test-and-test-and-set without execessive bus contention SIGARCH Comput Archit News 1990 18 2 25-32
[17]
Hammarlund P, Crossland JB, Kaushik SD, Aggarwal A (2003) Inter-processor Interrupts. US Patent 8,984,199 B2. https://patents.google.com/patent/US8984199B2/en
[18]
Haur I, Béchennec J-L, and Roux OH Riesco A and Zhang M Formal verification of the inter-core synchronization of a multi-core rtos kernel Formal methods and software engineering 2022 Berlin Springer 140-155
[19]
Haur I, Béchennec J-L, Roux OH (2021) Formal schedulability analysis based on multi-core RTOS model. In: 29th International Conference on Real-Time Networks and Systems. RTNS’2021, pp. 216–225. Association for Computing Machinery, New York, NY, USA .
[20]
Hofer W, Lohmann D, Scheler F, Schröder-Preikschat W (2009) Sloth: Threads as interrupts. In: Proceedings of the 30th IEEE International Symposium on Real-Time Systems (RTSS ’09), pp. 204–213. IEEE Computer Society Press, Washington.
[21]
Hoffmann M, Lukas F, Dietrich C, Lohmann D (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), pp. 259–270. IEEE Computer Society Press, Washington, DC, USA.
[22]
Holsti N (2008) Computing time as a program variable: a way around infeasible paths. In: Kirner, R. (ed.) 8th International Workshop on Worst-Case Execution Time Analysis (WCET’08). OpenAccess Series in Informatics (OASIcs), vol. 8. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany. . also published in print by Austrian Computer Society (OCG) with ISBN 978-3-85403-237-3. http://drops.dagstuhl.de/opus/volltexte/2008/1660
[23]
Hubertus Franke MK (2002) Rusty Russell: Fuss, futexes and furwocks: Fast userlevel locking in Linux. In: Hutton, A.J., Donovan, S., Ross, C.C. (eds.) Proceedings of the Ottawa Linux Symposium, pp. 479–495
[24]
Kaestner D, Miné A, Schmidt A, Hille H, Mauborgne L, Wilhelm S, Rival X, Feret J, Cousot P, and Ferdinand C Finding all potential run-time errors and data races in automotive software 2017 Detroit SAE International
[25]
Kaffes K, Chong T, Humphries JT, Belay A, Mazières D, Kozyrakis C (2019) Shinjuku: Preemptive scheduling for μsecond-scale tail latency. In: 16th USENIX Symposium on Networked Systems Design and Implementation (NSDI 19), pp. 345–360. USENIX Association, Boston, MA. https://www.usenix.org/conference/nsdi19/presentation/kaffes
[26]
Khachiyan LG (1979) A Polynomial Algorithm in Linear Programming 244:1093–1096
[27]
Kroening D, Poetzl D, Schrammel P, Wachter B (2016) Sound static deadlock analysis for c/pthreads. In: Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering. ASE 2016, pp. 379–390. Association for Computing Machinery, New York, NY, USA.
[28]
Lakshmanan K, Bhatia G, Rajkumar R (2011) AUTOSAR extensions for predictable task synchronization in multi-core ECUs. In: Proceedings of the SAE 2011 World Congress
[29]
Lakshmanan K, Kato S, Rajkumar RR (2010) Scheduling parallel real-time tasks on multi-core processors. In: Proceedings of the 31st IEEE International Symposium on Real-Time Systems (RTSS ’10), pp. 259–268. IEEE Computer Society Press, Washington, DC, USA
[30]
Lamport L The temporal logic of actions ACM Trans Program Lang Syst 1994 16 3 872-923
[31]
Lattner C, Adve V (2004) LLVM: A compilation framework for lifelong program analysis & transformation. In: Proceedings of the 2004 International Symposium on Code Generation and Optimization (CGO’04), pp. 75–86. IEEE Computer Society Press, Washington, DC, USA.
[32]
Leyva-del-Foyo LE, Mejia-Alvarez P, Niz D (2006) Predictable interrupt management for real time kernels over conventional PC hardware. In: Proceedings of the 12th IEEE International Symposium on Real-Time and Embedded Technology and Applications (RTAS ’06), pp. 14–23. IEEE Computer Society Press, Los Alamitos, CA, USA.
[33]
Marwedel P Embedded system design 2006 Heidelberg Springer
[34]
Miné A (2015) AstréeA: A static analyzer for large embedded multi-task software. In: Proc. of the 16th International Conference on Verification, Model Checking, and Abstract Interpretation (VMCAI’15). Lecture Notes in Computer Science (LNCS), vol. 8931, p. 3. Springer, Berlin
[35]
Miné A Static analysis of run-time errors in embedded real-time parallel c programs Log Methods Comput Sci 2012
[36]
Mittermayr R and Blieberger J A generic graph model for wcet analysis of multi-core concurrent applications J Softwa Eng Appl 2016 9 182-198
[37]
Mittermayr R and Blieberger J Deadlock and wcet analysis of barrier-synchronized concurrent programs Computing 2021 103 749-770
[38]
OSEK/VDX Group (2005) Operating system specification 2.2.3. Technical report, OSEK/VDX Group. http://portal.osek-vdx.org/files/pdf/specs/os223.pdf, visited 2014-09-29
[39]
Pu C, Massalin H, and Ioannidis J The Synthesis kernel Comput Syst 1988 1 1 11-32
[40]
Rajagopalan M, Debray SK, Hiltunen MA, Schlichting RD (2005) Automatic operating system specialization via binary rewriting
[41]
Rinard M Cousot P Analysis of multithreaded programs Static analysis 2001 Berlin Springer 1-19
[42]
Rommel F, Dietrich C, Rodin M, Lohmann D (2019) Multiverse: Compiler-assisted management of dynamic variability in low-level system software. In: Fourteenth EuroSys Conference 2019 (EuroSys ’19). ACM Press, New York, NY, USA.
[43]
Scheler F, Schröder-Preikschat W (2010) The RTSC: Leveraging the migration from event-triggered to time-triggered systems. In: Proceedings of the 13th IEEE International Symposium on Object-Oriented Real-Time Distributed Computing (ISORC ’10), pp. 34–41. IEEE Computer Society Press, Washington, DC, USA.
[44]
Schuster S, Wägemann P, Ulbrich P, Schröder-Preikschat W (2019) Proving real-time capability of generic operating systems by system-aware timing analysis. In: 2019 IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS), pp. 318–330.
[45]
Schwarz M, Saan S, Seidl H, Apinis K, Erhard J, and Vojdani V Drăgoi C, Mukherjee S, and Namjoshi K Improving thread-modular abstract interpretation Static analysis 2021 Chicago Springer 359-383
[46]
Ulbrich P, Kapitza R, Harkort C, Schmid R, Schröder-Preikschat W (2011) I4Copter: An adaptable and modular quadrotor platform. In: Proceedings of the 26th ACM Symposium on Applied Computing (SAC ’11), pp. 380–396. ACM Press, New York, NY, USA
[47]
Wägemann P, Dietrich C, Distler T, Ulbrich P, Schröder-Preikschat W (2018) hole-system worst-case energy-consumption analysis for energy-constrained real-time systems. In: Altmeyer, S. (ed.) Proceedings of the 30th Euromicro Conference on Real-Time Systems 2018. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik.
[48]
Wieder A, Brandenburg BB (2013) On spin locks in AUTOSAR: Blocking analysis of FIFO, unordered, and priority-ordered spin locks. In: Proceedings of the 34th IEEE International Symposium on Real-Time Systems (RTSS ’13), pp. 45–56. IEEE Computer Society Press, USA.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Real-Time Systems
Real-Time Systems  Volume 60, Issue 3
Sep 2024
167 pages

Publisher

Kluwer Academic Publishers

United States

Publication History

Published: 03 October 2024
Accepted: 24 August 2024

Author Tags

  1. Real-Time Systems
  2. Multi Core
  3. Lock Elision
  4. IPI avoidance
  5. Syscall Cost Model

Qualifiers

  • Research-article

Funding Sources

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 0
    Total Downloads
  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 13 Jan 2025

Other Metrics

Citations

View Options

View options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media