Skip to main content

Verification of Static and Dynamic Barrier Synchronization Using Bounded Permissions

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 8144))

Abstract

Mainstream languages such as C/C++ (with Pthreads), Java, and .NET provide programmers with both static and dynamic barriers for synchronizing concurrent threads in fork/join programs. However, such barrier synchronization in fork/join programs is hard to verify since programmers must not only keep track of the dynamic number of participating threads, but also ensure that all participants proceed in correctly synchronized phases. As barriers are commonly used in practice, verifying correct synchronization of barriers can provide compilers and analysers with important phasing information for improving the precision of their analyses and optimizations.

In this paper, we propose an approach for statically verifying correct synchronization of static and dynamic barriers in fork/join programs. We introduce the notions of bounded permissions and phase numbers for keeping track of the number of participating threads and barrier phases respectively. The approach has been proven sound, and a prototype of it (named VeriBSync) has been implemented for verifying barrier synchronization of realistic programs in the SPLASH-2 benchmark suite.

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. The Open Group Base Specifications Issue 7 IEEE Std 1003 (January 2008), http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/pthread.h.html

  2. Aiken, A., Gay, D.: Barrier Inference. In: POPL, pp. 342–354 (1998)

    Google Scholar 

  3. Bierhoff, K., Aldrich, J.: Modular typestate checking of aliased objects. In: OOPSLA, pp. 301–320 (2007)

    Google Scholar 

  4. Bornat, R., Calcagno, C., O’Hearn, P., Parkinson, M.: Permission Accounting in Separation Logic. In: POPL, pp. 259–270. ACM, New York (2005)

    Google Scholar 

  5. Boyland, J.: Checking Interference with Fractional Permissions. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, pp. 55–72. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  6. Dockins, R., Hobor, A., Appel, A.W.: A Fresh Look at Separation Algebras and Share Accounting. In: Hu, Z. (ed.) APLAS 2009. LNCS, vol. 5904, pp. 161–177. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  7. Freeman, A.: Pro.NET 4 Parallel Programming in C#. Apress (2010)

    Google Scholar 

  8. Gherghina, C.: Personal communication (April 2013)

    Google Scholar 

  9. González, J.F.: Java 7 Concurrency Cookbook. Packt. Pub. Limited (2012)

    Google Scholar 

  10. Hobor, A., Gherghina, C.: Barriers in concurrent separation logic: Now with tool support? Logical Methods in Computer Science 8(2) (2012)

    Google Scholar 

  11. Jeremiassen, T.E., Eggers, S.J.: Static Analysis of Barrier Synchronization in Explicitly Parallel Programs. In: PACT, pp. 171–180 (1994)

    Google Scholar 

  12. Kamil, A., Yelick, K.: Concurrency Analysis for Parallel Programs with Textually Aligned Barriers. In: Ayguadé, E., Baumgartner, G., Ramanujam, J., Sadayappan, P. (eds.) LCPC 2005. LNCS, vol. 4339, pp. 185–199. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  13. Kamil, A., Yelick, K.: Enforcing Textual Alignment of Collectives Using Dynamic Checks. In: Gao, G.R., Pollock, L.L., Cavazos, J., Li, X. (eds.) LCPC 2009. LNCS, vol. 5898, pp. 368–382. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  14. Le, D.K., Chin, W.N., Teo, Y.M.: Verification of Static and Dynamic Barrier Synchronization Using Bounded Permissions. Technical report, NUS (April 2013)

    Google Scholar 

  15. Lin, Y.: Static Nonconcurrency Analysis of OpenMP Programs. In: Mueller, M.S., Chapman, B.M., de Supinski, B.R., Malony, A.D., Voss, M. (eds.) IWOMP 2005/2006. LNCS, vol. 4315, pp. 36–50. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  16. Naden, K., Bocchino, R., Aldrich, J., Bierhoff, K.: A Type System for Borrowing Permissions. In: POPL, pp. 557–570 (2012)

    Google Scholar 

  17. O’Hearn, P.W.: Resources, Concurrency and Local Reasoning. In: Schmidt, D. (ed.) ESOP 2004. LNCS, vol. 2986, pp. 1–2. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  18. Reynolds, J.: Separation Logic: A Logic for Shared Mutable Data Structures. In: LICS, Copenhagen, Denmark (July 2002)

    Google Scholar 

  19. Saraswat, V.A., Jagadeesan, R.: Concurrent Clustered Programming. In: Abadi, M., de Alfaro, L. (eds.) CONCUR 2005. LNCS, vol. 3653, pp. 353–367. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  20. Shirako, J., Peixotto, D.M., Sarkar, V., Scherer III, W.N.: Phasers: A Unified Deadlock-free Construct for Collective and Point-to-point Synchronization. In: ICS, pp. 277–288 (2008)

    Google Scholar 

  21. Smans, J., Jacobs, B., Piessens, F.: Implicit Dynamic Frames. In: TOPLAS (2012)

    Google Scholar 

  22. Woo, S.C., Ohara, M., Torrie, E., Singh, J.P., Gupta, A.: The SPLASH-2 Programs: Characterization and Methodological Considerations. In: ICSA (1995)

    Google Scholar 

  23. Zhang, Y., Duesterwald, E.: Barrier Matching for Programs with Textually Unaligned Barriers. In: PPoPP, pp. 194–204 (2007)

    Google Scholar 

  24. Zhang, Y., Duesterwald, E., Gao, G.R.: Concurrency Analysis for Shared Memory Programs with Textually Unaligned Barriers. In: Adve, V., Garzarán, M.J., Petersen, P. (eds.) LCPC 2007. LNCS, vol. 5234, pp. 95–109. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Le, DK., Chin, WN., Teo, YM. (2013). Verification of Static and Dynamic Barrier Synchronization Using Bounded Permissions. In: Groves, L., Sun, J. (eds) Formal Methods and Software Engineering. ICFEM 2013. Lecture Notes in Computer Science, vol 8144. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-41202-8_16

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-41202-8_16

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-41201-1

  • Online ISBN: 978-3-642-41202-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics