ABSTRACT
To achieve high-performance on multicore systems, sharedmemory parallel languages must efficiently implement atomic operations. The commonly used and studied paradigms for atomicity are fine-grained locking, which is both difficult to program and error-prone; optimistic software transactions, which require substantial overhead to detect and recover from atomicity violations; and compiler-generation of locks from programmer-specified atomic sections, which leads to serialization whenever imprecise pointer analysis suggests the mere possibility of a conflicting operation. This paper presents a new strategy for compiler-generated locking that uses data structure knowledge to facilitate more precise alias and lock generation analyses and reduce unnecessary serialization. Implementing and evaluating these ideas in the Java language shows that the new strategy achieves eight-thread speedups of 0.83 to 5.9 for the five STAMP benchmarks studied, outperforming software transactions on all but one benchmark, and nearly matching programmer-specified fine-grained locks on all but one benchmark. The results also indicate that compiler knowledge of data structures improves the effectiveness of compiler analysis, boosting eight-thread performance by up to 300%. Further, the new analysis allows for software support of strong atomicity with less than 1% overhead for two benchmarks and less than 20% for three others.The strategy also nearly matches the performance of programmer-specified fine-grained locks for the SPECjbb2000 benchmark, which has traditionally not been amenable to static analyses.
- C. Boyapati, R. Lee, and M. Rinard. Ownership types for safe programming: preventing data races and deadlocks. In OOPSLA '02: Proceedings of the 17th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pages 211--230, New York, NY, USA, 2002. ACM. Google Scholar
Digital Library
- C. Cao Minh, J. Chung, C. Kozyrakis, and K. Olukotun. STAMP: Stanford transactional applications for multi-processing. In IISWC '08: Proceedings of The IEEE International Symposium on Workload Characterization, September 2008.Google Scholar
Cross Ref
- B. D. Carlstrom, A. McDonald, H. Chafi, J. Chung, C. C. Minh, C. Kozyrakis, and K. Olukotun. The Atomos transactional programming language. SIGPLAN Not., 41(6):1--13, 2006. Google Scholar
Digital Library
- S. Cherem, T. M. Chilimbi, and S. Gulwani. Inferring locks for atomic sections. In R. Gupta and S. P. Amarasinghe, editors, Proceedings of the 2008 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '08), pages 304--315. ACM, 2008. Google Scholar
Digital Library
- D. Dice, O. Shalev, and N. Shavit. Transactional Locking II. In 20th International Symposium on Distributed Computing, pages 194--208, 2006. Google Scholar
Digital Library
- M. Emmi, J. S. Fischer, R. Jhala, and R. Majumdar. Lock allocation. In POPL '07: Proceedings of the 34th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 291--296, New York, NY, USA, 2007. ACM. Google Scholar
Digital Library
- J. N. Gray, R. A. Lorie, G. R. Putzolu, and I. L. Traiger. Granularity of locks and degrees of consistency in a shared data base. In Readings in database systems (2nd ed.), pages 181--208. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 1994. Google Scholar
Digital Library
- R. L. Halpert, C. J. Pickett, and C. Verbrugge. Component-based lock allocation. In PACT '07: International Conference on Parallel Architectures and Compilation Techniques, pages 353--364, Los Alamitos, CA, USA, 2007. IEEE Computer Society. Google Scholar
Digital Library
- T. Harris, S. Marlow, S. Peyton-Jones, and M. Herlihy. Composable memory transactions. In PPoPP '05: Proceedings of the tenth ACM SIGPLAN symposium on Principles and practice of parallel programming, pages 48--60, New York, NY, USA, 2005. ACM Press. Google Scholar
Digital Library
- M. Herlihy and E. Koskinen. Transactional boosting: a methodology for highly-concurrent transactional objects. In PPoPP '08: Proceedings of the 13th ACM SIGPLAN Symposium on Principles and practice of parallel programming, pages 207--216, New York, NY, USA, 2008. ACM. Google Scholar
Digital Library
- M. Herlihy, V. Luchangco, M. Moir, and W. N. Scherer. Software transactional memory for dynamic-sized data structures. In PODC '03: Proceedings of the twenty-second annual symposium on Principles of distributed computing, pages 92--101, New York, NY, USA, 2003. ACM Press. Google Scholar
Digital Library
- M. Hicks, J. S. Foster, and P. Prattikakis. Lock inference for atomic sections. In Proceedings of the First ACM SIGPLAN Workshop on Languages, Compilers, and Hardware Support for Transactional Computing, June 2006.Google Scholar
- O. S. Hofmann, C. J. Rossbach, and E. Witchel. Maximum benefit from a minimal htm. In ASPLOS '09: Proceeding of the 14th international conference on Architectural support for programming languages and operating systems, pages 145--156, New York, NY, USA, 2009. ACM. Google Scholar
Digital Library
- Jikes RVM web page on magic functions. http://jikesrvm.org/Magic, last accessed Nov. 12, 2008.Google Scholar
- D. Lea. Concurrent Programming in Java: Design Principles and Patterns. Addison-Wesley, second edition, November 1999. Google Scholar
Digital Library
- O. Lhoták and L. Hendren. Scaling Java points-to analysis using Spark. In G. Hedin, editor, Compiler Construction, 12th International Conference, volume 2622 of LNCS, pages 153--169, Warsaw, Poland, April 2003. Springer. Google Scholar
Digital Library
- B. McCloskey, F. Zhou, D. Gay, and E. Brewer. Autolocker: synchronization inference for atomic sections. In POPL '06: Conference record of the 33rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 346--358, New York, NY, USA, 2006. ACM. Google Scholar
Digital Library
- M. Moir, K. Moore, and D. Nussbaum. The adaptive transactional memory test platform: a tool for experimenting with transactional code for rock (poster). In SPAA '08: Proceedings of the twentieth annual symposium on Parallelism in algorithms and architectures, pages 362--362, 2008. Google Scholar
Digital Library
- F. T. Schneider, V. Menon, T. Shpeisman, and A.-R. Adl-Tabatabai. Dynamic optimization for efficient strong atomicity. SIGPLAN Not., 43(10):181--194, 2008. Google Scholar
Digital Library
- N. Shavit and D. Touitou. Software transactional memory. In Symposium on Principles of Distributed Computing, pages 204--213, 1995. Google Scholar
Digital Library
- T. Shpeisman, V. Menon, A.-R. Adl-Tabatabai, S. Balensiefer, D. Grossman, R. L. Hudson, K. F. Moore, and B. Saha. Enforcing isolation and ordering in STM. In PLDI '07: Proceedings of the 2007 ACM SIGPLAN conference on Programming language design and implementation, pages 78--88, New York, NY, USA, 2007. Google Scholar
Digital Library
- The Standard Performance Evaluation Corporation. SPECjbb2000 Benchmark. At http://www.spec.org/jbb2000, 2000.Google Scholar
- P. Wu, S. P. Midkiff, J. E. Moreira, and M. Gupta. Efficient support for complex numbers in Java. In Proceedings of the 1999 ACM Java Grande Conference, pages 109--118, 1999. IBM Research Report RC21393. Google Scholar
Digital Library
- Y. Zhang, V. C. Sreedhar,W. Zhu, V. Sarkar, and G. R. Gao. Minimum lock assignment: A method for exploiting concurrency among critical sections. In 21st Annual Workshop on Languages and Compilers for Parallel Computing (LCPC '08), 2008. Google Scholar
Digital Library
- J. Zhu and S. Calman. Symbolic pointer analysis revisited. In PLDI '04: Proceedings of the ACM SIGPLAN 2004 conference on Programming language design and implementation, pages 145--157, New York, NY, USA, 2004. ACM. Google Scholar
Digital Library
Index Terms
Using data structure knowledge for efficient lock generation and strong atomicity
Recommendations
Using data structure knowledge for efficient lock generation and strong atomicity
PPoPP '10To achieve high-performance on multicore systems, sharedmemory parallel languages must efficiently implement atomic operations. The commonly used and studied paradigms for atomicity are fine-grained locking, which is both difficult to program and error-...
An effective hybrid transactional memory system with strong isolation guarantees
ISCA '07: Proceedings of the 34th annual international symposium on Computer architectureWe propose signature-accelerated transactional memory (SigTM), ahybrid TM system that reduces the overhead of software transactions. SigTM uses hardware signatures to track the read-set and write-set forpending transactions and perform conflict ...
An effective hybrid transactional memory system with strong isolation guarantees
We propose signature-accelerated transactional memory (SigTM), ahybrid TM system that reduces the overhead of software transactions. SigTM uses hardware signatures to track the read-set and write-set forpending transactions and perform conflict ...







Comments