Skip to main content
Log in

Analysis of Correct Synchronization of Operating System Components

  • Published:
Programming and Computer Software Aims and scope Submit manuscript

Abstract

Most of the software model checker tools do not scale well on complicated software. Our goal was to develop a tool, which provides an adjustable balance between precise and slow software model checkers and fast and imprecise static analyzers. The key idea of the approach is an abstraction over the precise thread interaction and analysis for each thread in a separate way, but together with a specific environment, which models effects of other threads. The environment contains a description of potential actions over the shared data and synchronization primitives, and conditions for its application. Adjusting the precision of the environment, one can achieve a required balance between speed and precision of the complete analysis. A formal description of the suggested approach was performed within a Configurable Program Analysis theory. It allows formulating assumptions and proving the soundness of the approach under the assumptions. For efficient data race detection we use a specific memory model, which allows to distinguish memory domains into the disjoint set of regions, which correspond to a data types. An implementation of the suggested approach into the CPAchecker framework allows reusing an existed approaches with minimal changes. Implementation of additional techniques according to the extended theory allows to increase the precision of the analysis. Results of the evaluation allow confirming scalability and practical usability of the approach.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1.
Fig. 2.
Fig. 3.
Fig. 4.
Fig. 5.
Fig. 6.
Fig. 7.

Similar content being viewed by others

Notes

  1. sv-benchmarks/c/ldv-linux-3.14-races/directory

  2. https://github.com/sosy-lab/sv-benchmarks.git, sv-benchmarks/c/ldv-linux-3.14-races/linux-3.14–drivers–spi–spi-tegra20-slink.ko.cil.i

  3. https://patchwork.kernel.org/patch/9915305/

  4. https://sv-comp.sosy-lab.org/2019/results/results-verified/META_ConcurrencySafety.table.html

REFERENCES

  1. Abdulla, P., Aronis, S., Jonsson, B., and Sagonas, K., Optimal dynamic partial order reduction, SIGPLAN Not., 2014, vol. 49, no. 1, pp. 373–384.

    Article  Google Scholar 

  2. Godefroid, P., Partial-Order Methods for the Verification of Concurrent Systems: an Approach to the State-Explosion Problem, Berlin, Heidelberg: Springer-Verlag, 1996.

    Book  Google Scholar 

  3. Basler, G., Mazzucchi, M., Wahl, T., and Kroening, D., Symbolic counter abstraction for concurrent software, in Proc. 21st Int. Conf. on Computer Aided Verification, CAV’09, Berlin, Heidelberg: Springer-Verlag, 2009, pp. 64–78.

  4. Beyer, D., Automatic verification of C and Java programs: SV-COMP 2019, in Tools and Algorithms for the Construction and Analysis of Systems, Beyer, D. Huisman, M. Kordon, F. and Steffen, B., Eds., Cham: Springer Int. Publ., 2019, pp. 133–155.

  5. Beyer, D., Henzinger, T.A., and Theoduloz, G., Program analysis with dynamic precision adjustment, in Proc. 23rd IEEE/ACM Int. Conf. on Automated Software Engineering, ASE 2008, L’Aquila, Sept. 2008, pp. 29–38.

  6. Flanagan C. and Qadeer, S., Thread-modular model checking, in Proc. 10th Int. Conf. on Model Checking Software, SPIN’03, Berlin, Heidelberg: Springer-Verlag, 2003, pp. 213–224.

  7. Henzinger, T. A., Jhala, R., Majumdar, R., and Qadeer, S., Thread-Modular Abstraction Refinement, Berlin, Heidelberg: Springer, 2003, pp. 262–274.

    Book  Google Scholar 

  8. Cook, B., Kroening, D., and Sharygina, N., Verification of boolean programs with unbounded thread creation, Theor. Comput. Sci., 2007, vol. 388, no. 1–3, pp. 227–242.

    Article  MathSciNet  Google Scholar 

  9. Gupta, A., Popeea, C., and Rybalchenko, A., Threader, a constraint-based verifier for multi-threaded programs, in Proc. 23rd Int. Conf. on Computer Aided Verification, CAV’11, Berlin, Heidelberg: Springer-Verlag, 2011, pp. 412–417.

  10. Clarke, E.M., Grumberg, O., Jha, S., Lu, Y., and Veith, H., Counter example-guided abstraction refinement, Proc. CAV 2000: Computer Aided Verification, Chicago, 2000, pp. 154–169.

  11. Graf S. and Saidi, H., Construction of abstract state graphs with PVS, in Computer Aided Verification, Grumberg, O., Ed., Berlin, Heidelberg: Springer, 1997, pp. 72–83.

    Google Scholar 

  12. Savage, S., Burrows, M., Nelson, G., Sobalvarro, P., and Anderson, T., Eraser: a dynamic data race detector for multi-threaded programs, SIGOPS Oper. Syst. Rev., 1997, vol. 31, no. 5, pp. 27–37.

    Article  Google Scholar 

  13. Bornat, R., Proving pointer programs in Hoare logic, in Proc. 5th Int. Conf. on Mathematics of Program Construction, MPC’00, London: Springer-Verlag, 2000, pp. 102–126.

  14. Burstall, R.M., Some techniques for proving correctness of programs which alter data structures, in Machine Intelligence 7, Michie, D., Ed., New York: American Elsevier, 1972, pp. 23–50.

    Google Scholar 

  15. Andrianov, P., Friedberger, K., Mandrykin, M., Mutilin, V., and Volkov, A., CPA-BAM-BnB: block-abstraction memoization and region-based memory models for predicate abstractions, in Tools and Algorithms for the Construction and Analysis of Systems, Legay, A. and Margaria, T., Eds., Berlin, Heidelberg: Springer, 2017, pp. 355–359.

    Google Scholar 

  16. Novikov, E. and Zakharov, I., Towards automated static veri_cation of GNU C programs, in Perspectives of System Informatics, Petrenko, A.K. and Voronkov, A., Eds., Cham: Springer Int. Publ., 2018, pp. 402–416.

    Google Scholar 

  17. Novikov, E. and Zakharov, I., Verification of operating system monolithic kernels without extensions, in Leveraging Applications of Formal Methods, Verification and Validation. Industrial Practice, Margaria, T. and Steffen, B., Eds., Cham: Springer Int. Publ., 2018, pp. 230–248.

    Google Scholar 

  18. Beyer, D. and Friedberger, K., A light-weight approach for verifying multithreaded programs with CPAchecker, in Proc. 11th Doctoral Workshop on Mathematical and Engineering Methods in Computer Science (MEMICS 2016) Telč, Czechia, Oct. 21–23, 2016, Bouda, J., Holík, L., Kofroñ, J., Strejček, J., and Rambousek, A., Eds., 2016, pp. 61–71.

  19. Beyer, D. and Löwe, S., Explicit-state software model checking based on CEGAR and interpolation, in Proc. 16th Int. Conf. on Fundamental Approaches to Software Engineering (FASE 2013, Rome, Italy, March 20–22, 2013), Heidelberg: Springer-Verlag, 2013, pp. 146–162.

  20. Beyer, D., Keremoglu, M.E., and Wendler, P., Predicate abstraction with adjustableblock encoding, Proc. Formal Methods in Computer-Aided Design, FMCAD 2010, Lugano, 2010.

  21. Biere, A., Cimatti, A., Clarke, E.M., and Zhu, Y., Symbolic model checking without bdds, in Proc. 5th Int. Conf. on Tools and Algorithms for Construction and Analysis of Systems, TACAS’99, London: Springer-Verlag, 1999, pp. 193–207.

  22. Beyer, D., Henzinger, T.A., and Théoduloz, G., Configurable software verification: concretizing the convergence of model checking and program analysis, in Proc. CAV, Berlin, Heidelberg: Springer-Verlag, 2007, pp. 504–518.

  23. Beyer, D., Löwe, S., and Wendler, P., Reliable benchmarking: requirements and solutions. Int. J. Software Tools Technol. Transfer, 2019, vol. 21, no. 1, pp. 1–29.

    Article  Google Scholar 

  24. Qadeer S. and Rehof, J., Context-bounded model checking of concurrent software, in Tools and Algorithms for the Construction and Analysis of Systems, Halbwachs, N. and Zuck, L.D., Eds., Berlin, Heidelberg: Springer, 2005, pp. 93–107.

    MATH  Google Scholar 

  25. Cordeiro, L., Morse, J., Nicole, D., and Fischer, B., Context-bounded model checking with esbmc 1.17, in Proc. 18th Int. Conf. on Tools and Algorithms for the Construction and Analysis of Systems, TACAS’12, Berlin, Heidelberg: Springer-Verlag, 2012, pp. 534–537.

  26. Cohen, A. and Namjoshi, K.S., Local proofs for global safety properties, Formal Methods Syst. Des., 2009, vol. 34, no. 2, pp. 104–125.

    Article  Google Scholar 

  27. Henzinger, T.A., Jhala, R., and Majumdar, R., Race checking by context inference, in Proc. ACM SIGPLAN 2004 Conf. on Programming Language Design and Implementation, PLDI’04, New York: ACM, 2004, pp. 1–13.

  28. Malkis, A., Podelski, A., and Rybalchenko, A., Thread-modular verification is cartesian abstract interpretation, in Proc. Theoretical Aspects of Computing – ICTAC 2006, Barkaoui, K., Cavalcanti, A., and Cerone, A., Eds., Berlin, Heidelberg: Springer, 2006, pp. 183–197.

    Google Scholar 

  29. Gupta, A., Popeea, C., and Rybalchenko, A., Predicate abstraction and refinement for verifying multi-threaded programs, SIGPLAN Not., 2011, vol. 46, no. 1, pp. 331–344.

    Article  Google Scholar 

  30. Lal, A. and Reps, T., Reducing concurrent analysis under a context bound tosequential analysis, Formal Methods Syst. Des., 2009, vol. 35, no. 1, pp. 73–97.

    Article  Google Scholar 

  31. La Torre, S., Madhusudan, P., and Parlato, G., Reducing contextbounded concurrent reachability to sequential reachability, in Computer Aided Verification, Bouajjani, A. and Maler, O., Eds., Berlin, Heidelberg: Springer, 2009, pp. 477–492.

    Google Scholar 

  32. Tomasco, E., Inverso, O., Fischer, B., La Torre, S., and Parlato, G., MU-CSeq: sequentialization of C programs by shared memory unwindings, in Tools and Algorithms for the Construction and Analysis of Systems, Ábrahám, E. and Havelund, K., Eds., Berlin, Heidelberg: Springer, 2014, pp. 402–404.

    Google Scholar 

  33. Deligiannis, P., Donaldson, A.F., and Rakamaric, Z., Fast and precise symbolic analysis of concurrency bugs in device drivers (t), in Proc. 30th IEEE/ACM Int. Conf. on Automated Software Engineering, ASE’15, Washington: IEEE Computer Soc., 2015, pp. 166–177.

  34. Lal, A., Qadeer, S., and Lahiri, S.K., A solver for reachability modulo theories, in Proc. 24th Int. Conf. on Computer Aided Verification, CAV’12, Berlin, Heidelberg: Springer-Verlag, 2012, pp. 427–443.

  35. Voung, J.W., Jhala, R., and Lerner, S., RELAY: static race detection on millions of lines of code, in Proc. 6th Joint Meeting of the European Software Engineering Conf. and the ACM SIGSOFT Symp. on the Foundations of Software Engineering, ESEC-FSE’07, New York: ACM, 2007, pp. 205–214.

  36. Pratikakis, P., Foster, J.S., and Hicks, M., LOCKSMITH: context sensitive correlation analysis for race detection, in Proc. 27th ACM SIGPLAN Conf. on Programming Language Design and Implementation, PLDI’06, New York: ACM, 2006, pp. 320–331.

  37. Di, P. and Sui, Y., Accelerating dynamic data race detection using static thread interference analysis, in Proc. 7th Int. Workshop on Programming Models and Applications for Multicores and Manycores, PMAM’16, New York: ACM, 2016, pp. 30–39.

  38. Kroening, D., Liang, L., Melham, T., Schrammel, P., and Tautschnig, M., Effective verification of low-level software with nested interrupts, Proc. ACM Design, Automation & Test in Europe Conf. & Exhibition (DATE 2015), Grenoble, March 2015, pp. 229–234.

  39. Mukherjee, S., Kumar, A., and D’Souza, D., Detecting all high-level dataraces in an RTOS kernel, in Verification, Model Checking, and Abstract Interpretation, Bouajjani, A. and Monniaux, D., Eds., Cham: Springer Int. Publ., 2017, pp. 405–423.

    Google Scholar 

  40. Chopra, N., Pai, R., and D’Souza, D., Data races and static analysis for interrupt-driven kernels, in Programming Languages and Systems, Caires, L., Ed., Cham: Springer Int. Publ., 2019, pp. 697–723.

    Google Scholar 

  41. Bai, J.-J., Lawall, J., Chen, Q.-L., and Hu, S.-M., Effective static analysis of concurrency use-after-free bugs in Linux device drivers, in Proc. USENIX Annu. Technical Conf. (USENIX ATC 19), Renton, WA: USENIX Assoc., July 2019, pp. 255–268.

  42. Beyer, D., Jakobs, M.-C., Lemberger, T., and Wehrheim, H., Reducer-based construction of conditional verifiers, in Proc. 40th Int. Conf. on Software Engineering, ICSE’18, New York: ACM, 2018, pp. 1182–1193.

Download references

ACKNOWLEDGMENTS

The research was carried out with funding from the Ministry of Science and Higher Education of the Russian Federation (the project unique identifier is RFMEFI60719X0295).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to P. S. Andrianov.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Andrianov, P.S. Analysis of Correct Synchronization of Operating System Components. Program Comput Soft 46, 712–730 (2020). https://doi.org/10.1134/S0361768820080022

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1134/S0361768820080022

Navigation