[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/3178487.3178505acmconferencesArticle/Chapter ViewAbstractPublication PagesppoppConference Proceedingsconference-collections
research-article

Safe privatization in transactional memory

Published: 10 February 2018 Publication History

Abstract

Transactional memory (TM) facilitates the development of concurrent applications by letting the programmer designate certain code blocks as atomic. Programmers using a TM often would like to access the same data both inside and outside transactions, e.g., to improve performance or to support legacy code. In this case, programmers would ideally like the TM to guarantee strong atomicity, where transactions can be viewed as executing atomically also with respect to non-transactional accesses. Since guaranteeing strong atomicity for arbitrary programs is prohibitively expensive, researchers have suggested guaranteeing it only for certain data-race free (DRF) programs, particularly those that follow the privatization idiom: from some point on, threads agree that a given object can be accessed non-transactionally. Supporting privatization safely in a TM is nontrivial, because this often requires correctly inserting transactional fences, which wait until all active transactions complete.
Unfortunately, there is currently no consensus on a single definition of transactional DRF, in particular, because no existing notion of DRF takes into account transactional fences. In this paper we propose such a notion and prove that, if a TM satisfies a certain condition generalizing opacity and a program using it is DRF assuming strong atomicity, then the program indeed has strongly atomic semantics. We show that our DRF notion allows the programmer to use privatization idioms. We also propose a method for proving our generalization of opacity and apply it to the TL2 TM.

References

[1]
ISO/IEC. Technical Specification for C++ Extensions for Transactional Memory, 19841:2015. 2015.
[2]
ISO/IEC. Programming Languages --- C++, 14882:2017. 2017.
[3]
M. Abadi, A. Birrell, T. Harris, J. Hsieh, and M. Isard. Implementation and use of transactional memory with dynamic separation. In International Conference on Compiler Construction (CC), pages 63--77, 2009.
[4]
M. Abadi, A. Birrell, T. Harris, and M. Isard. Semantics of transactional memory and automatic mutual exclusion. ACM Trans. Program. Lang. Syst., 33:2:1--2:50, 2011.
[5]
M. Abadi, T. Harris, and K. F. Moore. A model of dynamic separation for transactional memory. In International Conference on Concurrency Theory (CONCUR), pages 6--20, 2008.
[6]
S. V. Adve and M. D. Hill. Weak ordering - A new definition. In International Symposium on Computer Architecture (ISCA), pages 2--14, 1990.
[7]
H. Attiya, A. Gotsman, S. Hans, and N. Rinetzky. A programming language perspective on transactional memory consistency. In Symposium on Principles of Distributed Computing (PODC), pages 309--318, 2013.
[8]
L. Dalessandro and M. L. Scott. Strong isolation is a weak idea. In Workshop on Transactional Computing (TRANSACT), 2009.
[9]
L. Dalessandro, M. L. Scott, and M. F. Spear. Transactions as the foundation of a memory consistency model. In International Symposium on Distributed Computing (DISC), pages 20--34, 2010.
[10]
L. Dalessandro, M. F. Spear, and M. L. Scott. Norec: streamlining STM by abolishing ownership records. In Symposium on Principles and Practice of Parallel Programming (PPOPP), pages 67--78, 2010.
[11]
P. Damron, A. Fedorova, Y. Lev, V. Luchangco, M. Moir, and D. Nussbaum. Hybrid transactional memory. In International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), pages 336--346, 2006.
[12]
D. Dice, O. Shalev, and N. Shavit. Transactional locking II. In International Symposium on Distributed Computing (DISC), pages 194--208, 2006.
[13]
D. Dice and N. Shavit. TLRW: return of the read-write lock. In Symposium on Parallelism in Algorithms and Architectures (SPAA), pages 284--293, 2010.
[14]
S. Doherty, L. Groves, V. Luchangco, and M. Moir. Towards formally specifying and verifying Transactional Memory. Formal Aspects of Computing, 25(5):769--799, 2013.
[15]
P. Felber, C. Fetzer, P. Marlier, and T. Riegel. Time-based software transactional memory. IEEE Transactions on Parallel and Distributed Systems, 21(12):1793--1807, 2010.
[16]
I. Filipovic, P. O'Hearn, N. Rinetzky, and H. Yang. Abstraction for concurrent objects. Theoretical Computer Science, 411(51--52):4379 -- 4398, 2010.
[17]
A. Gotsman, N. Rinetzky, and H. Yang. Verifying concurrent memory reclamation algorithms with grace. In European Symposium on Programming (ESOP), pages 249--269, 2013.
[18]
R. Guerraoui, T. A. Henzinger, M. Kapalka, and V. Singh. Transactions in the jungle. In Symposium on Parallelism in Algorithms and Architectures (SPAA), pages 263--272, 2010.
[19]
R. Guerraoui and M. Kapalka. On the correctness of transactional memory. In Symposium on Principles and Practice of Parallel Programming (PPOPP), pages 175--184, 2008.
[20]
R. Guerraoui and M. Kapalka. Principles of Transactional Memory. Synthesis Lectures on Distributed Computing Theory. Morgan & Claypool Publishers, 2010.
[21]
T. Harris, J. Larus, and R. Rajwar. Transactional Memory. Morgan and Claypool Publishers, 2nd edition, 2010.
[22]
M. Herlihy and J. E. B. Moss. Transactional memory: Architectural support for lock-free data structures. In International Symposium on Computer Architecture (ISCA), pages 289--300, 1993.
[23]
Intel Corporation. Intel architecture instruction set extensions programming reference. Chapter 8: Intel transactional synchronization extensions, 2012.
[24]
G. Kestor, O. S. Unsal, A. Cristal, and S. Tasiran. T-rex: a dynamic race detection tool for C/C++ transactional memory applications. In European Systems Conference (Eurosys), pages 20:1--20:12, 2014.
[25]
A. Khyzha, H. Attiya, A. Gotsman, and N. Rinetzky. Safe privatization in transactional memory (extended version). arXiv CoRR, 1801.04249, 2018.
[26]
S. Kumar, M. Chu, C. J. Hughes, P. Kundu, and A. Nguyen. Hybrid transactional memory. In Symposium on Principles and Practice of Parallel Programming (PPOPP), pages 209--220, 2006.
[27]
L. Lamport. How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Computers, 28(9):690--691, 1979.
[28]
H. Q. Le, G. L. Guthrie, D. E. Williams, M. M. Michael, B. G. Frey, W. J. Starke, C. May, R. Odaira, and T. Nakaike. Transactional memory support in the ibm power8 processor. IBM Journal of Research and Development, 59(1):8:1--8:14, 2015.
[29]
M. Lesani, V. Luchangco, and M. Moir. Specifying transactional memories with nontransactional operations. In Workshop on the Theory of Transactional Memory (WTTM), 2013.
[30]
J. Manson, W. Pugh, and S. V. Adve. The java memory model. In Symposium on Principles of Programming Languages (POPL), pages 378--391, 2005.
[31]
V. J. Marathe, M. F. Spear, C. Heriot, A. Acharya, D. Eisenstat, W. N. Scherer III, and M. L. Scott. Lowering the overhead of software transactional memory. In Workshop on Transactional Computing (TRANSACT), 2006.
[32]
P. E. McKenney. Exploiting Deferred Destruction: An Analysis of Read-Copy-Update Techniques in Operating System Kernels. PhD thesis, OGI School of Science and Engineering at Oregon Health and Sciences University, 2004.
[33]
C. C. Minh, J. Chung, C. Kozyrakis, and K. Olukotun. STAMP: Stanford transactional applications for multi-processing. In International Symposium on Workload Characterization (IISWC), pages 35--46, 2008.
[34]
K. F. Moore and D. Grossman. High-level small-step operational semantics for transactions. In Symposium on Principles of Programming Languages (POPL), pages 51--62, 2008.
[35]
J. E. B. Moss and A. L. Hosking. Nested transactional memory: model and architecture sketches. Science of Computer Programming, 63(2):186--201, 2006.
[36]
Y. Ni, V. S. Menon, A.-R. Adl-Tabatabai, A. L. Hosking, R. L. Hudson, J. E. B. Moss, B. Saha, and T. Shpeisman. Open nesting in software transactional memory. In Symposium on Principles and Practice of Parallel Programming (PPOPP), pages 68--78, 2007.
[37]
M. Olszewski, J. Cutler, and J. G. Steffan. JudoSTM: A dynamic binary-rewriting approach to software transactional memory. In International Conference on Parallel Architecture and Compilation Techniques (PACT), pages 365--375, 2007.
[38]
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 Symposium on Principles and Practice of Parallel Programming (PPOPP), pages 187--197, 2006.
[39]
N. Shavit and D. Touitou. Software transactional memory. Distributed Computing, 10(2):99--116, 1997.
[40]
T. Shpeisman, A.-R. Adl-Tabatabai, R. Geva, Y. Ni, and A. Welc. Towards transactional memory semantics for C++. In Symposium on Parallelism in Algorithms and Architectures (SPAA), pages 49--58, 2009.
[41]
M. F. Spear, V. J. Marathe, L. Dalessandro, and M. L. Scott. Privatization techniques for software transactional memory. Technical Report 915, Computer Science Department, University of Rochester, 2007.
[42]
M. F. Spear, M. M. Michael, and C. von Praun. RingSTM: Scalable transactions with a single atomic instruction. In Symposium on Parallelism in Algorithms and Architectures (SPAA), pages 275--284, 2008.
[43]
R. M. Yoo, Y. Ni, A. Welc, B. Saha, A. Adl-Tabatabai, and H. S. Lee. Kicking the tires of software transactional memory: why the going gets tough. In Symposium on Parallelism in Algorithms and Architectures (SPAA), pages 265--274, 2008.
[44]
T. Zhou, P. Zardoshti, and M. F. Spear. Practical experience with transactional lock elision. In International Conference on Parallel Processing (ICPP), pages 81--90, 2017.

Cited By

View all
  • (2019)A Graph Transformation System formalism for Software Transactional Memory OpacityProceedings of the XXIII Brazilian Symposium on Programming Languages10.1145/3355378.3355387(3-10)Online publication date: 23-Sep-2019
  • (2019)Modular transactionsProceedings of the 24th Symposium on Principles and Practice of Parallel Programming10.1145/3293883.3295708(82-93)Online publication date: 16-Feb-2019
  • (2019)Automated Refactoring for StampedlockIEEE Access10.1109/ACCESS.2019.29319537(104900-104911)Online publication date: 2019
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
PPoPP '18: Proceedings of the 23rd ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming
February 2018
442 pages
ISBN:9781450349826
DOI:10.1145/3178487
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 53, Issue 1
    PPoPP '18
    January 2018
    426 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/3200691
    Issue’s Table of Contents
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].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 10 February 2018

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. observational refinement
  2. privatization
  3. software transactional memory
  4. strong atomicity

Qualifiers

  • Research-article

Conference

PPoPP '18

Acceptance Rates

Overall Acceptance Rate 230 of 1,014 submissions, 23%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)13
  • Downloads (Last 6 weeks)1
Reflects downloads up to 30 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2019)A Graph Transformation System formalism for Software Transactional Memory OpacityProceedings of the XXIII Brazilian Symposium on Programming Languages10.1145/3355378.3355387(3-10)Online publication date: 23-Sep-2019
  • (2019)Modular transactionsProceedings of the 24th Symposium on Principles and Practice of Parallel Programming10.1145/3293883.3295708(82-93)Online publication date: 16-Feb-2019
  • (2019)Automated Refactoring for StampedlockIEEE Access10.1109/ACCESS.2019.29319537(104900-104911)Online publication date: 2019
  • (2019)Refactoring Java Programs for Customizable Locks Based on Bytecode TransformationIEEE Access10.1109/ACCESS.2019.29192037(66292-66303)Online publication date: 2019
  • (2019)On the Semantics of Snapshot IsolationVerification, Model Checking, and Abstract Interpretation10.1007/978-3-030-11245-5_1(1-23)Online publication date: 11-Jan-2019
  • (2018)Safe privatization in transactional memoryACM SIGPLAN Notices10.1145/3200691.317850553:1(233-245)Online publication date: 10-Feb-2018
  • (2021)A Graph Transformation System formalism for correctness of Transactional Memory algorithmsProceedings of the 25th Brazilian Symposium on Programming Languages10.1145/3475061.3475080(49-57)Online publication date: 27-Sep-2021
  • (2019)Modular transactionsProceedings of the 24th Symposium on Principles and Practice of Parallel Programming10.1145/3293883.3295708(82-93)Online publication date: 16-Feb-2019
  • (2019)Transaction Protocol Verification with Labeled Synchronization LogicNASA Formal Methods10.1007/978-3-030-20652-9_19(280-297)Online publication date: 28-May-2019

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media