pp 1–22 | Cite as

Deadlock and WCET analysis of barrier-synchronized concurrent programs

  • Robert MittermayrEmail author
  • Johann Blieberger


Kronecker algebra until now has been applied to concurrent programs that use semaphores and protected objects for synchronization. Like many other programming languages, Ada uses barriers, too. In this paper, we present a new synchronization construct for barriers. By applying this, we are able to statically analyze Ada multi-tasking programs that employ barriers for synchronization issues. It turns out that we can use our existing Kronecker algebra implementation completely unmodified for concurrent program graphs using such barrier synchronization primitives. In addition, we extend a static WCET technique such that our barrier synchronization primitive is supported.


Barrier synchronization Worst-case execution time analysis Deadlocks Kronecker algebra Concurrent systems Multi-threaded programs 

Mathematics Subject Classification

68Q85 Models and methods for concurrent and distributed computing 


  1. 1.
    Aiken A, Gay D (1998) Barrier inference. In: Proceedings of the 25th ACM SIGPLAN-SIGACT symposium on principles of programming languages, POPL ’98, 19–21 January 1998, San Diego, California, USA, pp 342–354Google Scholar
  2. 2.
    Blieberger J (2002) Data-flow frameworks for worst-case execution time analysis. Real Time Syst 22(3):183–227CrossRefzbMATHGoogle Scholar
  3. 3.
    Blieberger J, Burgstaller B, Mittermayr R (2007) Static detection of livelocks in ada multitasking programs. In: Proceedings of the 12th international conference on reliable software technologies, vol 4498. Springer LNCS, pp 69–83Google Scholar
  4. 4.
    Brukardt RL (ed) (2016) Annotated ada reference manual, ISO/IEC 8652:2012/Cor 1:2016Google Scholar
  5. 5.
    Buchholz P, Kemper P (2002) Efficient computation and representation of large reachability sets for composed automata. Discret Event Dyn. Syst. 12(3):265–286MathSciNetCrossRefzbMATHGoogle Scholar
  6. 6.
    Burgstaller B, Blieberger J (2014) Kronecker algebra for static analysis of Ada programs with protected objects. In: Ada-Europe’ 2014 international conference on reliable software technologies, LNCS 8454, Paris, pp 27–42Google Scholar
  7. 7.
    Burgstaller B, Scholz B, Blieberger J (2012) A symbolic analysis framework for static analysis of imperative programming languages. J Syst Softw 85(6):1418–1439CrossRefGoogle Scholar
  8. 8.
    Buse RPL, Weimer WR (2009) The road not taken: estimating path execution frequency statically. In: Proceedings of the 31st international conference on software engineering—ICSE 2009, Vancouver, Canada, May 16–24, 2009, pp 144–154Google Scholar
  9. 9.
    Chattopadhyay S, Chong LK, Roychoudhury A, Kelter T, Marwedel P, Falk H (2012) A unified WCET analysis framework for multi-core platforms. In: IEEE real-time and embedded technology and applications symposium, pp 99–108Google Scholar
  10. 10.
    Downey AB (2016) The little book of semaphores. Green Tea Press, 2nd edn, version 2.2.1Google Scholar
  11. 11.
    Fechete R, Kienesberger G, Blieberger J (2008) A framework for CFG-based static program analysis of ada programs. In: Proceedings of Ada-Europe, Springer LNCS, pp 130–143Google Scholar
  12. 12.
    Gerdes M, Kluge F, Ungerer T, Rochange C (2012) The split-phase synchronisation technique: reducing the pessimism in the WCET analysis of parallelised hard real-time programs. In: Proceedings of the 18th international conference RTCSA, pp 88–97Google Scholar
  13. 13.
    González JF (2012) Java 7 concurrency cookbook. Packt Publishing Ltd., Mumbai/BirminghamGoogle Scholar
  14. 14.
    Graham RL, Knuth DE, Patashnik O (1994) Concrete mathematics: a foundation for computer science, 2nd edn. Addison-Wesley Longman Publishing Co., Inc., BostonzbMATHGoogle Scholar
  15. 15.
    Hill JMD, Skillicorn DB (1998) Practical barrier synchronisation. In: 6th EuroMicro workshop on parallel and distributed processing (PDP ’98), IEEE Computer Society Press, pp 438–444Google Scholar
  16. 16.
    Kamil A, Yelick K (2006) Concurrency analysis for parallel programs with textually aligned barriers. In: Ayguadé E, Baumgartner G, Ramanujam J, Sadayappan P (eds) Languages and compilers for parallel computing, LCPC 2005, Lecture Notes in Computer Science, vol 4339. Springer, Berlin, pp 185–199Google Scholar
  17. 17.
    Le D-K, Chin W-N, Teo Y-M (2013) Verification of static and dynamic barrier synchronization using bounded permissions. ICFEM 2013, pp 231–248Google Scholar
  18. 18.
    Liang Y, Ding H, Mitra T, Roychoudhury A, Li Y, Suhendra V (2012) Timing analysis of concurrent programs running on shared cache multi-cores. Real-Time Syst. 48(6):638–680CrossRefzbMATHGoogle Scholar
  19. 19.
    Malkis A, Banerjee A (2012) Verification of software barriers. In: Proceedings of the 17th ACM SIGPLAN symposium on principles and practice of parallel programming, PPoPP ’12, New Orleans, Louisiana, USA, 25–29 February 2012, pp 313–314Google Scholar
  20. 20.
    Mittermayr R (Aug. 2016) Kronecker algebra based analysis of shared memory concurrent systems. Dissertation, 163 pp. TU Vienna, Treitlstr 1–3, 1040 ViennaGoogle Scholar
  21. 21.
    Mittermayr R, Blieberger J (2016) A generic graph model for WCET analysis of multi-core concurrent applications. J. of Softw. Eng. Appl. (JSEA), Spec Issue Parallel Concurr Comput 9(5):182–198Google Scholar
  22. 22.
    Mittermayr R, Blieberger J (2016) Kronecker algebra for static analysis of barriers in ada. In: Bertogna M, Pinho LM, Quinones E (eds), Proceedings of the 21th international conference on reliable software technologies, vol 9695, LNCS, pp 145–159Google Scholar
  23. 23.
    Mittermayr R, Blieberger J, Schöbel A (2012) Kronecker algebra based deadlock analysis for railway systems. J PROMET 24(5):359–369Google Scholar
  24. 24.
    Nélis V, Yomsi PM, Pinho LM (2015) Methodologies for the WCET analysis of parallel applications on many-core architectures. In: Proceedings of the 18th Euromicro conference on DSD, pp 748–755,Google Scholar
  25. 25.
    Ozaktas H, Rochange C, Sainrat P (2013) Automatic WCET analysis of real-time parallel applications. In: Maiza C (ed), Proceedings of the 13th international WCET, volume 30 of OASIcs, pp 11–20Google Scholar
  26. 26.
    Plateau B (1985) On the stochastic structure of parallelism and synchronization models for distributed algorithms. Perform Evaluation Rev 13(2):142–154CrossRefGoogle Scholar
  27. 27.
    Ramalingam G (1996) Data flow frequency analysis. In Fischer CN (ed), Proceedings of the ACM SIGPLAN conference on PLDI, ACM, pp 267–277Google Scholar
  28. 28.
    Ramalingam G (2000) Context-sensitive synchronization-sensitive analysis is undecidable. ACM Trans. Program. Lang. Syst. 22(2):416–430CrossRefGoogle Scholar
  29. 29.
    Sreedhar VC, Gao GR, Lee Y-F (1998) A new framework for elimination-based data flow analysis using DJ graphs. ACM Trans. Prog. Lang. Syst. (TOPLAS) 20(2):388–435CrossRefGoogle Scholar
  30. 30.
    Stallings W (2011) Operating systems–internals and design principles, 7th edn. Prentice Hall, Upper Saddle River, New JerseyGoogle Scholar
  31. 31.
    Stefan M, Blieberger J, Schöbel A (2017) Application of Kronecker algebra in railway operation. Tehnički vjesnik—Technical Gazette (TV-TG) 24(1):21–30Google Scholar
  32. 32.
    Tarjan RE (1972) Depth-first search and linear graph algorithms. SIAM J Comput (SICOMP) 1(2):146–160MathSciNetCrossRefzbMATHGoogle Scholar
  33. 33.
    Wilhelm R, Engblom J, Ermedahl A, Holsti N, Thesing S, Whalley D, Bernat G, Ferdinand C, Heckmann R, Mitra T, Mueller F, Puaut I, Puschner P, Staschulat J, Stenström P (2008) The worst-case execution-time problem—overview of methods and survey of tools. ACM TECS 7(3):36:1–36:53Google Scholar
  34. 34.
    Yan J, Zhang W (2008) WCET analysis for multi-core processors with shared L2 instruction caches. In: IEEE real-time and embedded technology and applications symposium, pp 80–89Google Scholar
  35. 35.
    Zhang Y, Duesterwald E (2007) Barriers matching for programs with textually unaligned barriers. In: Proceedings of the 12th ACM SIGPLAN symposium on principles and practice of parallel programming, PPoPP ’07, 14–17 March 2007, San Jose, California, USA, pp 194–204Google Scholar
  36. 36.
    Zhang Y, Duesterwald E, Gao GR (2007) Concurrency analysis for shared memory programs with textually unaligned barriers. LCPCGoogle Scholar

Copyright information

© Springer-Verlag Wien 2017

Authors and Affiliations

  1. 1.Institute of Computer Aided AutomationVienna University of TechnologyViennaAustria

Personalised recommendations