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%.
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- C. Blundell, E. C. Lewis, and M. M. K. Martin. Subtleties of Transactional Memory Atomicity Semantics. IEEE Computer Architecture Letters, 5(2), 2006. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- S. Burckhardt, A. Baldassin, and D. Leijen. Concurrent Programming with Revisions and Isolation Types. In OOPSLA '10, pages 691--707, 2010. Google ScholarDigital Library
- 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 ScholarDigital Library
- L. Dalessandro, M. F. Spear, and M. L. Scott. NOrec: Streamlining STM by Abolishing Ownership Records. In PPoPP '10, pages 67--78, 2010.Google ScholarDigital Library
- 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 ScholarDigital Library
- D. Dice and N. Shavit. TLRW: Return of the Read-write Lock. In SPAA '10, pages 284--293, 2010.Google ScholarDigital Library
- D. Dice, O. Shalev, and N. Shavit. Transactional Locking II. In DISC '06, pages 194--208, 2006. Google ScholarDigital Library
- 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 ScholarDigital Library
- A. Georges, D. Buytaert, and L. Eeckhout. Statistically Rigorous Java Performance Evaluation. In OOPSLA '07, pages 57--76, 2007. Google ScholarDigital Library
- D. Grossman. The Transactional Memory / Garbage Collection Analogy. In OOPSLA '07, pages 695--706, 2007.Google Scholar
- R. Guerraoui and M. Kapalka. On the Correctness of Transactional Memory. In PPoPP '08, pages 175--184, 2008. Google ScholarDigital Library
- 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 Scholar
- P. B. Hansen. Distributed Processes: A Concurrent Programming Concept. Commun. ACM, 21(11):934--941, 1978. Google ScholarDigital Library
- T. Harris. Exceptions and Side-effects in Atomic Blocks. Sci. Comput. Program., 58(3):325--343, 2005. Google ScholarDigital Library
- T. Harris and K. Fraser. Language Support for Lightweight Transactions. In OOPSLA '03, pages 388--402, 2003.Google ScholarDigital Library
- T. Harris, S. Marlow, S. Peyton-Jones, and M. Herlihy. Composable Memory Transactions. In PPoPP '05, pages 48--60, 2005.Google ScholarDigital Library
- M. Herlihy and J. E. B. Moss. Transactional Memory: Architectural Support for Lock-free Data Structures. In ISCA '93, pages 289--300, 1993.Google Scholar
- 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 ScholarDigital Library
- M. Isard and A. Birrell. Automatic Mutual Exclusion. In HOTOS '07, pages 3:1--3:6, 2007.Google Scholar
- E. Koskinen and M. Herlihy. Dreadlocks: Efficient Deadlock Detection. In SPAA '08, pages 297--303, 2008.Google ScholarDigital Library
- B. C. Kuszmaul, C. E. Leiserson, and S. Fellow. Transactions Everywhere. Technical report, 2003.Google Scholar
- 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 Scholar
- N. D. Matsakis. Parallel Closures: A New Twist on an Old Idea. In HotPar '12, pages 5--5, 2012.Google Scholar
- 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 Scholar
- 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 ScholarDigital Library
- N. Shavit and D. Touitou. Software Transactional Memory. In PODC '95, pages 204--213, 1995. Google ScholarDigital Library
- Y. Smaragdakis, A. Kay, R. Behrends, and M. Young. Transactions with Isolation and Cooperation. In OOPSLA '07, pages 191--210, 2007.Google ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
Index Terms
- Synchronized-by-Default Concurrency for Shared-Memory Systems
Recommendations
Synchronized-by-Default Concurrency for Shared-Memory Systems
PPoPP '17We 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. ...
Unbounded page-based transactional memory
Proceedings of the 2006 ASPLOS ConferenceExploiting thread level parallelism is paramount in the multicore era. Transactions enable programmers to expose such parallelism by greatly simplifying the multi-threaded programming model. Virtualized transactions (unbounded in space and time) are ...
Unbounded page-based transactional memory
Proceedings of the 2006 ASPLOS ConferenceExploiting thread level parallelism is paramount in the multicore era. Transactions enable programmers to expose such parallelism by greatly simplifying the multi-threaded programming model. Virtualized transactions (unbounded in space and time) are ...
Comments