Abstract
We consider the problem of statically detecting data races in periodic real-time programs that use locks, and run on a single processor platform. We propose a technique based on a small set of rules that exploits the priority, periodicity, locking, and timing information of tasks in the program. One of the key requirements is a response time analysis for such programs, and we propose an algorithm to compute this for the case of non-nested locks. We have implemented our analysis for real-time programs written in C in a tool called PePRacer and evaluated its performance on a small set of benchmarks from the literature.
Supported by University Grants Commission (UGC), New Delhi, India and Royal Academy of Engineering, UK
Chapter PDF
Similar content being viewed by others
References
OpenAADL/AADLib - a library of AADL components (2011), https://github.com/OpenAADL/AADLib
nxtOSEK/JSP: RTOS for Lego MindStorms NXT (2013), http://lejos-osek.sourceforge.net/
Baruah, S.K.: Resource sharing in edf-scheduled systems: A Closer Look. In: Proc. 27th IEEE Real-Time Systems Symposium (RTSS), 5-8 December, Rio de Janeiro, Brazil. pp. 379–387. IEEE Computer Society (2006)
Baruah, S.K., Rosier, L.E., Howell, R.R.: Algorithms and Complexity Concerning the Preemptive Scheduling of Periodic, Real-Time Tasks on One Processor. Real Time Syst. 2(4), 301–324 (1990)
Bertogna, M., Fisher, N., Baruah, S.K.: Resource holding times: computation and optimization. Real Time Syst. 41(2), 87–117 (2009)
Chaki, S., Gurfinkel, A., Kong, S., Strichman, O.: Compositional Sequentialization of Periodic Programs. In: Proc. Verification, Model Checking, and Abstract Interpretation (VMCAI). pp. 536–554. Springer (2013)
Chaki, S., Gurfinkel, A., Strichman, O.: Time-Bounded Analysis of Real-Time Systems. In: Proc. Formal Methods in Computer-Aided Design (FMCAD). pp. 72–80. IEEE (2011)
Chaki, S., Gurfinkel, A., Strichman, O.: Verifying periodic programs with priority inheritance locks. In: Proc. Formal Methods in Computer-Aided Design (FMCAD). pp. 137–144. IEEE (2013)
Chopra, N., Pai, R., D’Souza, D.: Data Races and Static Analysis for Interrupt-Driven Kernels. In: Proc. European Symposium on Programming (ESOP). pp. 697–723. Springer (2019)
Guo, S., Wu, M., Wang, C.: Symbolic execution of programmable logic controller code. In: Proc. 11th Joint Meeting on Foundations of Software Engineering, (ESEC/FSE). pp. 326–336. ACM (2017)
Hardy, D., Rouxel, B., Puaut, I.: The Heptane Static Worst-Case Execution Time Estimation Tool. In: Proc. 17th Worst-Case Execution Time Analysis, (WCET). OASICS, vol. 57, pp. 8:1–8:12. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2017)
Joseph, M., Pandya, P.: Finding Response Times in a Real-Time System. The Computer Journal 29(5), 390–395 (01 1986)
Liu, C.L., Layland, J.W.: Scheduling algorithms for multi-programming in a hard-real-time environment. Journal of the ACM 20(1), 46–61 (Jan 1973)
Locke, C.D., Lucas, L., B., G.J.: Generic avionics software specification. Technical Report CMU/SEI-90-TR-8 (1990)
Necula, G.: CIL – Infrastructure for C Program Analysis and Transformation (v. 1.3.7). http://people.eecs.berkeley.edu/~necula/cil/ (2002)
Pellizzoni, R., Lipari, G.: Feasibility analysis of real-time periodic tasks with offsets. Real Time Syst. 30(1-2), 105–128 (2005)
Schwarz, M.D., Seidl, H., Vojdani, V., Lammich, P., Müller-Olm, M.: Static analysis of interrupt-driven programs synchronized via the priority ceiling protocol. In: Proc. 38th ACM SIGPLAN-SIGACT Principles of Programming Languages (POPL). pp. 93–104. ACM (2011)
Sha, L., Rajkumar, R., Lehoczky, J.P.: Priority inheritance protocols: An approach to real-time synchronization. IEEE Trans. Computers 39(9), 1175–1185 (1990)
Suresh, V.P., Pai, R., D’Souza, D., D’Souza, M., Chakrabarti, S.K.: PePRacer: A Tool for Static Race Detection in Periodic Programs (2022). https://doi.org/10.5281/zenodo.5919471
Tulsyan, R., Pai, R., D’Souza, D.: Static Race Detection for RTOS Applications. In: Proc. 40th Foundations of Software Technology and Theoretical Computer Science (FSTTCS). LIPIcs, vol. 182, pp. 57:1–57:20. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2020)
Wilhelm, R., Engblom, J., Ermedahl, A., Holsti, N., Thesing, S., Whalley, D.B., Bernat, G., Ferdinand, C., Heckmann, R., Mitra, T., Mueller, F., Puaut, I., Puschner, P.P., Staschulat, J., Stenström, P.: The worst-case execution-time problem – overview of methods and survey of tools. ACM Trans. Embed. Comput. Syst. 7(3), 36:1–36:53 (2008)
Author information
Authors and Affiliations
Corresponding authors
Editor information
Editors and Affiliations
Rights and permissions
Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.
Copyright information
© 2022 The Author(s)
About this paper
Cite this paper
Suresh, V.P., Pai, R., D’Souza, D., D’Souza, M., Chakrabarti, S.K. (2022). Static Race Detection for Periodic Programs. In: Sergey, I. (eds) Programming Languages and Systems. ESOP 2022. Lecture Notes in Computer Science, vol 13240. Springer, Cham. https://doi.org/10.1007/978-3-030-99336-8_11
Download citation
DOI: https://doi.org/10.1007/978-3-030-99336-8_11
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-99335-1
Online ISBN: 978-3-030-99336-8
eBook Packages: Computer ScienceComputer Science (R0)