Transactional Memory in GCC

Background

Transactional memory is intended to make programming with threads simpler. As with databases, a transaction is a unit of work that either completes in its entirety or has no effect at all. Further, transactions are isolated from each other such that each transaction sees a consistent view of memory.

Transactional memory comes in two forms: a Software Transactional Memory (STM) system uses locks or other standard atomic instructions to do its job. A Hardware Transactional Memory (HTM) system uses features of the cpu to implement the requirements of the transaction directly (e.g. Rock processor). Most HTM systems are best effort, which means that the transaction can fail for unrelated reasons. Thus almost all systems that incorporate HTM also have a STM component and are thus termed Hybrid Transactional Memory systems.

The transactional memory system to be implemented in GCC provides single lock atomicity semantics. That is, a program behaves as if a single global lock guards each transaction.

Status

The implementation is ongoing on the transactional-memory branch in the GCC SVN repository.

Language Extensions

C++-transactional-constructs-1.0.pdf

The above document is the full description of the language extensions to be implemented in GCC.

Library ABI

Intel-TM-ABI-1_1_20060506.pdf

The above document is a work-in-progress to define a flexible TM library ABI that can be used for both pure STM and Hybrid implementations.

None: TransactionalMemory (last edited 2009-10-21 19:08:02 by RichardHenderson)