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

Safe open-nested transactions through ownership

Authors Info & Claims
Published:14 February 2009Publication History

ABSTRACT

Researchers in transactional memory (TM) have proposed open nesting as a methodology for increasing the concurrency of transactional programs. The idea is to ignore ``low-level'' memory operations of an open-nested transaction when detecting conflicts for its parent transaction, and instead perform abstract concurrency control for the ``high-level'' operation that the nested transaction represents. To support this methodology, TM systems use an open-nested commit mechanism that commits all changes performed by an open-nested transaction directly to memory, thereby avoiding low-level conflicts. Unfortunately, because the TM runtime is unaware of the different levels of memory, unconstrained use of open-nested commits can lead to anomalous program behavior.

We describe the framework of ownership-aware transactional memory which incorporates the notion of modules into the TM system and requires that transactions and data be associated with specific transactional modules or Xmodules. We propose a new ownership-aware commit mechanism, a hybrid between an open-nested and closed-nested commit which commits a piece of data differently depending on which Xmodule owns the data. Moreover, we provide a set of precise constraints on interactions and sharing of data among the Xmodules based on familiar notions of abstraction. The ownership-aware commit mechanism and these restrictions on Xmodules allow us to prove that ownership-aware TM has clean memory-level semantics. In particular, it guarantees serializability by modules, an adaptation of the definition of multilevel serializability from database systems. In addition, we describe how a programmer can specify Xmodules and ownership in a Java-like language. Our type system can enforce most of the constraints required by ownership-aware TM statically, and can enforce the remaining constraints dynamically. Finally, we prove that if transactions in the process of aborting obey restrictions on their memory footprint, then ownership-aware TM is free from semantic deadlock.

References

  1. K. Agrawal, I.-T. A. Lee, and J. Sukha. Safe open-nested transactions through ownership (Technical report). Technical report, Laboratory of Computer Science and Artificial Intelligence, Massachusetts Institute of Technology, June 2008. Available at: http://supertech.csail.mit.edu/papers/safe-tech.pdf.Google ScholarGoogle Scholar
  2. K. Agrawal, C. E. Leiserson, and J. Sukha. Memory models for open-nested transactions. In Proceedings of the ACM SIGPLAN Workshop on Memory Systems Performance and Correctness (MSPC), October 2006. In conjunction ASPLOS. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. C. Boyapati, B. Liskov, and L. Shrira. Ownership types for object encapsulation. In Proceedings of the ACM Symposium on Principles of Programming Languages (POPL), New Orleans, Louisiana, Jan. 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. B. D. Carlstrom, A. McDonald, M. Carbin, C. Kozyrakis, and K. Olukotun. Transactional collection classes. In Proceedings of the ACM SIGPLAN Symposium on Principles and Practices of Parallel Programming (PPoPP), pages 56--67, New York, NY, USA, 2007. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. M. Herlihy and E. Koskinen. Transactional boosting: a methodology for highly-concurrent transactional objects. In Proceedings of ACM SIGPLAN Symposium on Principles and Practices of Parallel Programming (PPoPP), pages 207--216, New York, NY, USA, Feb 2008. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. M. Herlihy and J. E. B. Moss. Transactional memory: Architectural support for lock-free data structures. In Proceedings of the International Symposium on Computer Architecture (ISCA), pages 289--300, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. A. McDonald, J. Chung, B. D. Carlstrom, C. Cao Minh, H. Chafi, C. Kozyrakis, and K. Olukotun. Architectural semantics for practical transactional memory. In Proceedings of the International Symposium on Computer Architecture (ISCA), June 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. J. E. B. Moss. Nested Transactions: An Approach to Reliable Distributed Computing. MIT Press, Cambridge, MA, USA, 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. J. E. B. Moss. Open nested transactions: Semantics and support. In Proceedings of the Workshop on Memory Performance Issues (WMPI), Austin, Texas, Feb 2006.Google ScholarGoogle Scholar
  10. J. E. B. Moss and A. L. Hosking. Nested transactional memory: Model and architecture sketches. In Science of Computer Programming, volume 63, pages 186--201. Elsevier, Dec 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Y. Ni, V. Menon, A. Adl--Tabatabai, A. L. Hosking, R. L. Hudson, J. E. B. Moss, B. Saha, and T. Shpeisman. Open nesting in software transactional memory. In Proceedings of ACM SIGPLAN Symposium on Principles and Practices of Parallel Programming (PPoPP), Mar. 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. C. H. Papadimitriou. The serializability of concurrent database updates. Journal of the ACM, 26(4):631--653, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. G. Weikum. A theoretical foundation of multi-level concurrency control. In Proceedings of the ACM SIGACT-SIGMOD symposium on Principles of database systems (PODS), pages 31--43, New York, NY, USA, 1986. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Safe open-nested transactions through ownership

      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

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!