skip to main content
research-article
Open Access

SOFRITAS: Serializable Ordering-Free Regions for Increasing Thread Atomicity Scalably

Published:19 March 2018Publication History
Skip Abstract Section

Abstract

Correctly synchronizing multithreaded programs is challenging and errors can lead to program failures such as atomicity violations. Existing strong memory consistency models rule out some possible failures, but are limited by depending on programmer-defined locking code. We present the new Ordering-Free Region (OFR) serializability consistency model that ensures atomicity for OFRs, which are spans of dynamic instructions between consecutive ordering constructs (e.g., barriers), without breaking atomicity at lock operations. Our platform, Serializable Ordering-Free Regions for Increasing Thread Atomicity Scalably (SOFRITAS), ensures a C/C++ program's execution is equivalent to a serialization of OFRs by default. We build two systems that realize the SOFRITAS idea: a concurrency bug finding tool for testing called SOFRITEST, and a production runtime system called SOPRO. SOFRITEST uses OFRs to find concurrency bugs, including a multi-critical-section atomicity violation in memcached that weaker consistency models will miss. If OFR's are too coarse-grained, SOFRITEST suggests refinement annotations automatically. Our software-only SOPRO implementation has high performance, scales well with increased parallelism, and prevents failures despite bugs in locking code. SOFRITAS has an average overhead of just 1.59x on a single-threaded execution and 1.51x on sixteen threads, despite pthreads' much weaker memory model.

References

  1. V. Balaji, B. Lucia, and R. Marculescu. Overcoming the data-flow limit on parallelism with structural approximation. In WAX 2016, 2016.Google ScholarGoogle Scholar
  2. T. Bergan, O. Anderson, J. Devietti, L. Ceze, and D. Grossman. Coredet: A compiler and runtime system for deterministic multithreaded execution. In Proceedings of the Fifteenth Edition of ASPLOS on Architectural Support for Programming Languages and Operating Systems, ASPLOS XV, pages 53--64, New York, NY, USA, 2010. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. P. A. Bernstein, V. Hadzilacos, and N. Goodman. Concurrency Control and Recovery in Database Systems. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. C. Bienia. Benchmarking Modern Multiprocessors. PhD thesis, Princeton University, January 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. S. Biswas, M. Zhang, M. D. Bond, and B. Lucia. Valor: Efficient, software-only region conflict exceptions. In Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2015, pages 241--259, New York, NY, USA, 2015. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. C. Blundell, M. M. K. Martin, and T. Wenisch. Invisifence: Performance-transparent memory ordering in conventional multiprocessors. In Proceedings of the 36th Annual International Symposium on Computer Architecture, June 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. H.-J. Boehm and S. V. Adve. Foundations of the c+ concurrency memory model. In Proceedings of the SIGPLAN 2008 Conference on Programming Language Design and Implementation, PLDI '08, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. M. Botinvcan, M. Dodds, and S. Jagannathan. Proof-directed parallelization synthesis by separation logic. ACM Trans. Program. Lang. Syst., 35(2):8:1--8:60, July 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. G. Bracha and S. Toueg. Distributed deadlock detection. Distributed Computing, 2(3):127--138, 1987.Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. L. Ceze, P. Montesinos, C. von Praun, and J. Torrellas. Colorama: Architectural support for data-centric synchronization. In Proceedings of the 13th Symposium on High-Performance Computer Architecture, pages 133--144, Feb. 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. L. Ceze, J. Tuck, P. Montesinos, and J. Torrellas. BulkSC: Bulk Enforcement of Sequential Consistency. In Proceedings of the 34th Annual International Symposium on Computer Architecture, June 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. L. Ceze, C. von Praun, C. Cacscaval, P. Montesinos, and J. Torrellas. Concurrency control with data coloring. In Proceedings of the 2008 ACM SIGPLAN Workshop on Memory Systems Performance and Correctness, pages 6--10, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Cyrille Artho, Klaus Havelund, and Armin Biere. High-level data races. Journal on Software Testing, Verification & Reliability, 13(4):220--227, 2003.Google ScholarGoogle ScholarCross RefCross Ref
  14. L. Dalessandro and M. L. Scott. Sandboxing transactional memory. In Proceedings of the 21st International Conference on Parallel Architectures and Compilation Techniques, PACT '12, pages 171--180, New York, NY, USA, 2012. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. M. Das, G. Southern, and J. Renau. Section based program analysis to reduce overhead of detecting unsynchronized thread communication. In Proceedings of the 20th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP 2015, pages 283--284, New York, NY, USA, 2015. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. C. DeLozier, Y. Peng, A. Eizenberg, B. Lucia, and J. Devietti. Orca: Ordering-free regions for consistency and atomicity. Technical Report MS-CIS-16-01, University of Pennsylvania, May 2016.Google ScholarGoogle Scholar
  17. D. Dice, O. Shalev, and N. Shavit. Transactional locking ii. In Proceedings of the 20th International Conference on Distributed Computing, DISC'06, pages 194--208, Berlin, Heidelberg, 2006. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Y. Duan, D. Koufaty, and J. Torrellas. Scsafe: Logging sequential consistency violations continuously and precisely. In 2016 IEEE International Symposium on High Performance Computer Architecture (HPCA), pages 249--260, March 2016.Google ScholarGoogle ScholarCross RefCross Ref
  19. T. Elmas, S. Qadeer, and S. Tasiran. Goldilocks: A race and transaction-aware java runtime. In Proceedings of the SIGPLAN 2007 Conference on Programming Language Design and Implementation, pages 245--255, June 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Engadget. Intel announces Edison: a 22nm dual-core PC the size of an SD card, Jan. 2014. http://www.engadget.com/2014/01/06/intel-edison/.Google ScholarGoogle Scholar
  21. C. Flanagan and S. N. Freund. Atomizer: A dynamic atomicity checker for multithreaded programs. In Proceedings of The 31st ACM SIGPLAN/SIGACT Symposium on Principles of Programming Languages (POPL), pages 256--267, Jan. 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. C. Flanagan, S. N. Freund, and J. Yi. Velodrome: A sound and complete dynamic atomicity checker for multithreaded programs. In Proceedings of the SIGPLAN 2008 Conference on Programming Language Design and Implementation, PLDI '08, pages 293--303, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. L. Hammond, B. D. Carlstrom, V. Wong, B. Hertzberg, M. Chen, C. Kozyrakis, and K. Olukotun. Programming with transactional coherence and consistency (tcc). In Proceedings of the 11th International Conference on Architectural Support for Programming Languages and Operating Systems, pages 1--13, Oct. 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. M. Herlihy and J. E. B. Moss. Transactional memory: Architectural support for lock-free data structures. In Proceedings of the 20th Annual International Symposium on Computer Architecture, pages 289--300, May 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. International Standard ISO/IEC 14882:2011. Programming Languages -- C+. International Organization for Standards, 2011.Google ScholarGoogle Scholar
  26. M. Isard and A. Birrell. Automatic mutual exclusion. HotOS '07, pages 3:1--3:6, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. S. Kempf, R. Veldema, and M. Philippsen. Compiler-guided identification of critical sections in parallel code. In Proceedings of the 22nd International Conference on Compiler Construction, pages 204--223, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. L. Lamport. How to make a multiprocessor computer that correctly executes multiprocess programs. C-28(9):690--691, Sept. 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. S. Lu, S. Park, C. Hu, X. Ma, W. Jiang, Z. Li, R. A. Popa, and Y. Zhou. Muvi: Automatically inferring multi-variable access correlations and detecting related semantic and concurrency bugs. In Proceedings of the 21st ACM Symposium on Operating Systems Principles, pages 103--116, Oct. 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. S. Lu, J. Tucek, F. Qin, and Y. Zhou. AVIO: detecting atomicity violations via access interleaving invariants. In Proceedings of the 12th International Conference on Architectural Support for Programming Languages and Operating Systems, page 37-48, Oct. 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. B. Lucia and L. Ceze. Finding concurrency bugs with context-aware communication graphs. In Proceedings of the 42nd Annual IEEE/ACM International Symposium on Microarchitecture, pages 553--563, Nov. 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. B. Lucia, L. Ceze, and K. Strauss. Colorsafe: Architectural support for debugging and dynamically avoiding multi-variable atomicity violations. In Proceedings of the 37th Annual International Symposium on Computer Architecture, ISCA '10, pages 222--233, New York, NY, USA, 2010. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. B. Lucia, L. Ceze, K. Strauss, S. Qadeer, and H.-J. Boehm. Conflict exceptions: Simplifying concurrent language semantics with precise hardware exceptions for data-races. In Proceedings of the 37th Annual International Symposium on Computer Architecture, ISCA '10, pages 210--221, New York, NY, USA, 2010. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. B. Lucia, J. Devietti, K. Strauss, and L. Ceze. Atom-aid: Detecting and surviving atomicity violations. In Proceedings of the 35th Annual International Symposium on Computer Architecture, pages 277--288, June 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. S. Mador-Haim, L. Maranget, S. Sarkar, K. Memarian, J. Alglave, S. Owens, R. Alur, M. M. K. Martin, P. Sewell, and D. Williams. An axiomatic memory model for power multiprocessors. In Proceedings of the 24th International Conference on Computer Aided Verification, CAV'12, pages 495--512, Berlin, Heidelberg, 2012. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. J. Manson, W. Pugh, and S. V. Adve. The java memory model. In Proceedings of The 32nd ACM SIGPLAN/SIGACT Symposium on Principles of Programming Languages (POPL), pages 378--391, Jan. 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. D. Marino, A. Singh, T. Millstein, M. Musuvathi, and S. Narayanasamy. Drfx: A simple and efficient memory model for concurrent programming languages. In Proceedings of the SIGPLAN 2010 Conference on Programming Language Design and Implementation, pages 351--362, June 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. B. McCloskey, F. Zhou, D. Gay, and E. Brewer. Autolocker: Synchronization inference for atomic sections. In Proceedings of The 32nd ACM SIGPLAN/SIGACT Symposium on Principles of Programming Languages (POPL), pages 346--358, Jan. 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. A. Muzahid, S. Qi, and J. Torrellas. Vulcan: Hardware support for detecting sequential consistency violations dynamically. In Proceedings of the 2012 45th Annual IEEE/ACM International Symposium on Microarchitecture, MICRO-45, pages 363--375, Washington, DC, USA, 2012. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. J. Ouyang, P. M. Chen, J. Flinn, and S. Narayanasamy. textellipsisand region serializability for all. In Presented as part of the 5th USENIX Workshop on Hot Topics in Parallelism, Berkeley, CA, 2013. USENIX.Google ScholarGoogle Scholar
  41. C.-S. Park and K. Sen. Randomized active atomicity violation detection in concurrent programs. SIGSOFT '08/FSE-16, pages 135--145, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. X. Qian, J. Torrellas, B. Sahelices, and D. Qian. Volition: Scalable and precise sequential consistency violation detection. In Proceedings of the Eighteenth International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS '13, pages 535--548, New York, NY, USA, 2013. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. C. Ranger, R. Raghuraman, A. Penmetsa, G. Bradski, and C. Kozyrakis. Evaluating mapreduce for multi-core and multiprocessor systems. In Proceedings of the 2007 IEEE 13th International Symposium on High Performance Computer Architecture, HPCA '07, pages 13--24, Washington, DC, USA, 2007. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. S. Sarkar, P. Sewell, J. Alglave, L. Maranget, and D. Williams. Understanding power multiprocessors. In Proceedings of the 32Nd ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '11, pages 175--186, New York, NY, USA, 2011. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. A. Sengupta, S. Biswas, M. Zhang, M. D. Bond, and M. Kulkarni. Hybrid static--dynamic analysis for statically bounded region serializability. In Proceedings of the 20th International Conference on Architectural Support for Programming Languages and Operating Systems, pages 561--575, Mar. 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. P. Sewell, S. Sarkar, S. Owens, F. Z. Nardelli, and M. O. Myreen. X86-tso: A rigorous and usable programmer's model for x86 multiprocessors. Commun. ACM, 53(7):89--97, July 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. N. Shavit and D. Touitou. Software transactional memory. In Proceedings of the 14th ACM Symposium on Principles of Distributed Computing, pages 204--213, Aug. 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. A. Solar-Lezama, C. G. Jones, and R. Bodik. Sketching Concurrent Data Structures. In Proceedings of the SIGPLAN 2008 Conference on Programming Language Design and Implementation, PLDI '08, pages 136--148, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. University of Michigan. Concurrency Bugs, 2012. https://github.com/jieyu/concurrency-bugs.Google ScholarGoogle Scholar
  50. M. Vaziri, F. Tip, and J. Dolby. Associating synchronization constraints with data in an object-oriented language. In Proceedings of The 32nd ACM SIGPLAN/SIGACT Symposium on Principles of Programming Languages (POPL), pages 334--345, Jan. 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. M. Vaziri, F. Tip, J. Dolby, C. Hammer, and J. Vitek. A type system for data-centric synchronization. In Proceedings of the 24th European conference on Object-oriented programming, pages 304--328, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. M. Vechev, E. Yahav, and G. Yorsh. Abstraction-guided synthesis of synchronization. In Proceedings of The 37th ACM SIGPLAN/SIGACT Symposium on Principles of Programming Languages, POPL '10, pages 327--338, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. T. F. Wenisch, A. Ailamaki, B. Falsafi, and A. Moshovos. Mechanisms for store-wait-free multiprocessors. In Proceedings of the 34th Annual International Symposium on Computer Architecture, June 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. M. Xu, R. Bod'ık, and M. D. Hill. A serializability violation detector for shared-memory server programs. In Proceedings of the SIGPLAN 2005 Conference on Programming Language Design and Implementation, PLDI '05, pages 1--14, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. J. Yi, T. Disney, S. N. Freund, and C. Flanagan. Cooperative types for controlling thread interference in java. In Proceedings of the 2012 International Symposium on Software Testing and Analysis, ISSTA 2012, pages 232--242, New York, NY, USA, 2012. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. J. Yi, C. Sadowski, and C. Flanagan. Cooperative reasoning for preemptive execution. In Proceedings of the 16th ACM Symposium on Principles and Practice of Parallel Programming, PPoPP '11, pages 147--156, New York, NY, USA, 2011. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  57. J. Yu and S. Narayanasamy. A case for an interleaving constrained shared-memory multi-processor. In Proceedings of the 36th Annual International Symposium on Computer Architecture, ISCA '09, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  58. M. Zhang, S. Biswas, and M. D. Bond. Avoiding consistency exceptions under strong memory models. In Proceedings of the 2017 ACM SIGPLAN International Symposium on Memory Management, ISMM 2017, pages 115--127, New York, NY, USA, 2017. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. SOFRITAS: Serializable Ordering-Free Regions for Increasing Thread Atomicity Scalably

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        • Published in

          cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 53, Issue 2
          ASPLOS '18
          February 2018
          809 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/3296957
          Issue’s Table of Contents
          • cover image ACM Conferences
            ASPLOS '18: Proceedings of the Twenty-Third International Conference on Architectural Support for Programming Languages and Operating Systems
            March 2018
            827 pages
            ISBN:9781450349116
            DOI:10.1145/3173162

          Copyright © 2018 Owner/Author

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 19 March 2018

          Check for updates

          Qualifiers

          • research-article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!