Safe open-nested transactions through ownership

  • Kunal Agrawal
  • , I. Ting Angelina Lee
  • , Jim Sukha

Research output: Contribution to journalArticlepeer-review

1 Scopus citations

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 opennested 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 opennested 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 opennested 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 TMhas 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.

Original languageEnglish
Pages (from-to)151-162
Number of pages12
JournalACM SIGPLAN Notices
Volume44
Issue number4
DOIs
StatePublished - 2009

Fingerprint

Dive into the research topics of 'Safe open-nested transactions through ownership'. Together they form a unique fingerprint.

Cite this