skip to main content
10.1145/3018743.3018747acmconferencesArticle/Chapter ViewAbstractPublication PagesppoppConference Proceedingsconference-collections
research-article

Synchronized-by-Default Concurrency for Shared-Memory Systems

Published:26 January 2017Publication History

ABSTRACT

We explore a programming approach for concurrency that synchronizes all accesses to shared memory by default. Synchronization takes place by ensuring that all program code runs inside atomic sections even if the program code has external side effects. Threads are mapped to atomic sections that a programmer must explicitly split to increase concurrency.

A naive implementation of this approach incurs a large amount of overhead. We show how to reduce this overhead to make the approach suitable for realistic application programs on existing hardware. We present an implementation technique based on a special-purpose software transactional memory system. To reduce the overhead, the technique exploits properties of managed, object-oriented programming languages as well as intraprocedural static analyses and uses field-level granularity locking in combination with transactional I/O to provide good scaling properties.

We implemented the synchronized-by-default (SBD) approach for the Java language and evaluate its performance for six programs from the DaCapo benchmark suite. The evaluation shows that, compared to explicit synchronization, the SBD approach has an overhead between 0.4% and 102% depending on the benchmark and the number of threads, with a mean (geom.) of 23.9%.

References

  1. M. Abadi, A. Birrell, T. Harris, and M. Isard. Semantics of Transactional Memory and Automatic Mutual Exclusion. In POPL '08, pages 63--74, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. S. M. Blackburn, R. Garner, C. Hoffmann, A. M. Khang, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanovic, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo Benchmarks: Java Benchmarking Development and Analysis. In OOPSLA '06, pages 169--190, 2006.Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. C. Blundell, E. C. Lewis, and M. M. K. Martin. Subtleties of Transactional Memory Atomicity Semantics. IEEE Computer Architecture Letters, 5(2), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. J. Bobba, K. E. Moore, H. Volos, L. Yen, M. D. Hill, M. M. Swift, and D. A. Wood. Performance Pathologies in Hardware Transactional Memory. In ISCA '07, pages 81--91, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. R. L. Bocchino, Jr., V. S. Adve, D. Dig, S. V. Adve, S. Heumann, R. Komuravelli, J. Overbey, P. Simmons, H. Sung, and M. Vakilian. A Type and Effect System for Deterministic Parallel Java. In OOPSLA '09, pages 97--116, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. S. Burckhardt, A. Baldassin, and D. Leijen. Concurrent Programming with Revisions and Isolation Types. In OOPSLA '10, pages 691--707, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. L. Ceze, C. von Praun, C. Caşcaval, P. Montesinos, and J. Torrellas. Concurrency Control with Data Coloring. In MSPC '08, pages 6--10, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. L. Dalessandro, M. F. Spear, and M. L. Scott. NOrec: Streamlining STM by Abolishing Ownership Records. In PPoPP '10, pages 67--78, 2010.Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. T. David, R. Guerraoui, and V. Trigonakis. Everything You Always Wanted to Know About Synchronization but Were Afraid to Ask. In SOSP '13, pages 33--48, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. D. Dice and N. Shavit. TLRW: Return of the Read-write Lock. In SPAA '10, pages 284--293, 2010.Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. D. Dice, O. Shalev, and N. Shavit. Transactional Locking II. In DISC '06, pages 194--208, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. D. Dice, Y. Lev, M. Moir, and D. Nussbaum. Early Experience with a Commercial Hardware Transactional Memory Implementation. In ASPLOS XIV, pages 157--168, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. A. Georges, D. Buytaert, and L. Eeckhout. Statistically Rigorous Java Performance Evaluation. In OOPSLA '07, pages 57--76, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. D. Grossman. The Transactional Memory / Garbage Collection Analogy. In OOPSLA '07, pages 695--706, 2007.Google ScholarGoogle Scholar
  15. R. Guerraoui and M. Kapalka. On the Correctness of Transactional Memory. In PPoPP '08, pages 175--184, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. L. Hammond, B. D. Carlstrom, V. Wong, B. Hertzberg, M. Chen, C. Kozyrakis, and K. Olukotun. Programming with Transactional Coherence and Consistency (TCC). In ASPLOS XI,pages 1--13, 2004.Google ScholarGoogle Scholar
  17. P. B. Hansen. Distributed Processes: A Concurrent Programming Concept. Commun. ACM, 21(11):934--941, 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. T. Harris. Exceptions and Side-effects in Atomic Blocks. Sci. Comput. Program., 58(3):325--343, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. T. Harris and K. Fraser. Language Support for Lightweight Transactions. In OOPSLA '03, pages 388--402, 2003.Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. T. Harris, S. Marlow, S. Peyton-Jones, and M. Herlihy. Composable Memory Transactions. In PPoPP '05, pages 48--60, 2005.Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. M. Herlihy and J. E. B. Moss. Transactional Memory: Architectural Support for Lock-free Data Structures. In ISCA '93, pages 289--300, 1993.Google ScholarGoogle Scholar
  22. S. T. Heumann, V. S. Adve, and S. Wang. The Tasks with Effects Model for Safe Concurrency. In PPoPP '13, pages 239--250, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. M. Isard and A. Birrell. Automatic Mutual Exclusion. In HOTOS '07, pages 3:1--3:6, 2007.Google ScholarGoogle Scholar
  24. E. Koskinen and M. Herlihy. Dreadlocks: Efficient Deadlock Detection. In SPAA '08, pages 297--303, 2008.Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. B. C. Kuszmaul, C. E. Leiserson, and S. Fellow. Transactions Everywhere. Technical report, 2003.Google ScholarGoogle Scholar
  26. Y. D. Liu, X. Lu, and S. F. Smith. Coqa: Concurrent Objects with Quantized Atomicity. In CC '08/ETAPS '08, pages 260-- 275, 2008.Google ScholarGoogle Scholar
  27. N. D. Matsakis. Parallel Closures: A New Twist on an Old Idea. In HotPar '12, pages 5--5, 2012.Google ScholarGoogle Scholar
  28. K. E. Moore, J. Bobba, M. J. Moravan, M. D. Hill, and D. A. Wood. LogTM: Log-based Transactional Memory. In HPCA- 12, pages 254--265, 2006.Google ScholarGoogle Scholar
  29. B. Saha, A.-R. Adl-Tabatabai, R. L. Hudson, C. C. Minh, and B. Hertzberg. McRT-STM: A High Performance Software Transactional Memory System for a Multi-core Runtime. In PPoPP '06, pages 187--197, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. N. Shavit and D. Touitou. Software Transactional Memory. In PODC '95, pages 204--213, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Y. Smaragdakis, A. Kay, R. Behrends, and M. Young. Transactions with Isolation and Cooperation. In OOPSLA '07, pages 191--210, 2007.Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. M. F. Spear, V. J. Marathe, W. N. S. III, and M. L. Scott. Con- flict Detection and Validation Strategies for Software Transactional Memory. In DISC '06, pages 179--193, 2006.Google ScholarGoogle Scholar
  33. M. F. Spear, M. Silverman, L. Dalessandro, M. M. Michael, and M. L. Scott. Implementing and Exploiting Inevitability in Software Transactional Memory. In ICPP 2008, pages 59--66, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. R. Vallée-Rai, P. Co, E. Gagnon, L. Hendren, P. Lam, and V. Sundaresan. Soot - a Java Bytecode Optimization Framework. In CASCON '99, 1999.Google ScholarGoogle Scholar
  35. M. Vaziri, F. Tip, and J. Dolby. Associating Synchronization Constraints with Data in an Object-oriented Language. In POPL '06, pages 334--345, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. M. Zhang, J. Huang, M. Cao, and M. D. Bond. Low-overhead Software Transactional Memory with Progress Guarantees and Strong Semantics. In PPoPP '15, pages 97--108, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Synchronized-by-Default Concurrency for Shared-Memory Systems

        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
        • Published in

          cover image ACM Conferences
          PPoPP '17: Proceedings of the 22nd ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming
          January 2017
          476 pages
          ISBN:9781450344937
          DOI:10.1145/3018743

          Copyright © 2017 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 26 January 2017

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article

          Acceptance Rates

          PPoPP '17 Paper Acceptance Rate29of132submissions,22%Overall Acceptance Rate230of1,014submissions,23%

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader