Abstract
Designing correct synchronization algorithms is notoriously difficult, as evidenced by a bug we have identified that has apparently gone unnoticed in a well-known synchronization algorithm for nearly two decades. We use hardware transactional memory (HTM) to construct a corrected version of the algorithm. This version is significantly simpler than the original and furthermore improves on it by eliminating usage constraints and reducing space requirements. Performance of the HTM-based algorithm is competitive with the original in "normal" conditions, but it does suffer somewhat under heavy contention. We successfully apply some optimizations to help close this gap, but we also find that they are incompatible with known techniques for improving progress properties. We discuss ways in which future HTM implementations may address these issues. Finally, although our focus is on how effectively HTM can correct and simplify the algorithm, we also suggest bug fixes and workarounds that do not depend on HTM.
- D. Dice, M. Herlihy, D. Lea, Y. Lev, V. Luchangco, W. Mesard, M. Moir, K. Moore, and D. Nussbaum. Applications of the adaptive transactional memory test platform. Transact 2008 workshop, 2008. URL http://labs.oracle.com/projects/scalable/pubs/TRANSACT2008-ATMTP-Apps.pdf.Google Scholar
- D. Dice, Y. Lev, M. Moir, and D. Nussbaum. Early experience with a commercial hardware transactional memory implementation. In Proceeding of the 14th international conference on Architectural support for programming languages and operating systems, ASPLOS '09, 2009. Google Scholar
Digital Library
- D. Dice, Y. Lev, M. Moir, D. Nussbaum, and M. Olszewski. Early experience with a commercial hardware transactional memory implementation. Technical Report TR-2009-180, Sun Microsystems Laboratories, 2009. Google Scholar
Digital Library
- D. Dice, Y. Lev, V. J. Marathe, M. Moir, D. Nussbaum, and M. Oleszewski. Simplifying concurrent algorithms by exploiting hardware transactional memory. In Proceedings of the 22nd ACM symposium on Parallelism in algorithms and architectures, SPAA '10, 2010. Google Scholar
Digital Library
- D. Dice, Y. Lev, Y. Liu, V. Luchangco, and M. Moir. Using hardware transactional memory to correct and simplify a readers-writer lock algorithm, 2013. URL http://labs.oracle.com/projects/scalable/pubs/PPoPP2013-HTM-RWlocks-appendix.pdf.Google Scholar
- A. Dragojević and T. Harris. S™ in the small: trading generality for performance in software transactional memory. In Proceedings of the 7th ACM european conference on Computer Systems, EuroSys '12, pages 1--14, New York, NY, USA, 2012. ACM. ISBN 978-1-4503-1223-3. 10.1145/2168836.2168838. URL http://doi.acm.org/10.1145/2168836.2168838. Google Scholar
Digital Library
- M. Greenwald and D. Cheriton. The synergy between non-blocking synchronization and operating system structure. In Proceedings of the second USENIX symposium on Operating systems design and implementation, OSDI '96, pages 123--136, New York, NY, USA, 1996. ACM. ISBN 1-880446-82-0. 10.1145/238721.238767. URL http://doi.acm.org/10.1145/238721.238767. Google Scholar
Digital Library
- O. Krieger, M. Stumm, R. Unrau, and J. Hanna. A fair fast scalable rea,der-writer lock. In Proceedings of the 1993 International Conference on Parallel Processing - Volume 02, ICPP '93, pages 201--204, Washington, DC, USA, 1993. IEEE Computer Society. ISBN 0-8493-8983-6. 10.1109/ICPP.1993.21. URL http://dx.doi.org/10.1109/ICPP.1993.21. Google Scholar
Digital Library
- Y. Lev, V. Luchangco, and M. Olszewski. Scalable reader-writer locks. In Proceedings of the twenty-first annual symposium on Parallelism in algorithms and architectures, SPAA '09, pages 101--110, New York, NY, USA, 2009. ACM. ISBN 978-1-60558-606-9. 10.1145/1583991.1584020. URL http://doi.acm.org/10.1145/1583991.1584020. Google Scholar
Digital Library
- J. M. Mellor-Crummey and M. L. Scott. Algorithms for scalable synchronization on shared-memory multiprocessors. ACM Trans. Comput. Syst., 9 (1): 21--65, Feb. 1991. ISSN 0734-2071. 10.1145/103727.103729. URL http://doi.acm.org/10.1145/103727.103729. Google Scholar
Digital Library
- R. Rajwar and J. R. Goodman. Speculative lock elision: Enabling highly concurrent multithreaded execution. In Proc. 34th International Symposium on Microarchitecture, pages 294--305, Dec. 2001. Google Scholar
Digital Library
- I. Sparc International. The sparc architecture manual, version 8, 1991. URL http://www.sparc.org/standards/V8.pdf. Google Scholar
Digital Library
- M. Tremblay and S. Chaudhry. A third-generation 65nm 16-core 32-thread plus 32-scout-thread CMT SPARC® processor. In IEEE International Solid-State Circuits Conference, Feb. 2008.Google Scholar
Index Terms
Using hardware transactional memory to correct and simplify and readers-writer lock algorithm
Recommendations
Using hardware transactional memory to correct and simplify and readers-writer lock algorithm
PPoPP '13: Proceedings of the 18th ACM SIGPLAN symposium on Principles and practice of parallel programmingDesigning correct synchronization algorithms is notoriously difficult, as evidenced by a bug we have identified that has apparently gone unnoticed in a well-known synchronization algorithm for nearly two decades. We use hardware transactional memory (...
Refined transactional lock elision
PPoPP '16Transactional lock elision (TLE) is a well-known technique that exploits hardware transactional memory (HTM) to introduce concurrency into lock-based software. It achieves that by attempting to execute a critical section protected by a lock in an atomic ...
Refined transactional lock elision
PPoPP '16: Proceedings of the 21st ACM SIGPLAN Symposium on Principles and Practice of Parallel ProgrammingTransactional lock elision (TLE) is a well-known technique that exploits hardware transactional memory (HTM) to introduce concurrency into lock-based software. It achieves that by attempting to execute a critical section protected by a lock in an atomic ...







Comments