01.12.2012 Views

Architecture of Computing Systems (Lecture Notes in Computer ...

Architecture of Computing Systems (Lecture Notes in Computer ...

Architecture of Computing Systems (Lecture Notes in Computer ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Efficient Transaction Nest<strong>in</strong>g <strong>in</strong> Hardware Transactional Memory 139<br />

programm<strong>in</strong>g models, transactional memory can improve the programmability,<br />

avoid deadlock and furthermore, promote performance <strong>of</strong> concurrent programs.<br />

Transaction nest<strong>in</strong>g is one <strong>of</strong> the ongo<strong>in</strong>g challenges for hardware transactional<br />

memory. To support efficient closed nest<strong>in</strong>g, this paper proposes a conditional<br />

partial rollback (CPR) scheme which supports partial rollback conditionally<br />

without <strong>in</strong>creas<strong>in</strong>g hardware complexities significantly. Compared to the<br />

flatten<strong>in</strong>g model which is commonly-used <strong>in</strong> hardware transactional memory, the<br />

CPR scheme rolls back to the conflicted transaction itself or one <strong>of</strong> its outer-level<br />

transactions <strong>in</strong>stead <strong>of</strong> the outermost if given conditions are satisfied. Transactional<br />

memory system architecture with support <strong>of</strong> the CPR scheme is also<br />

proposed based on multi-core processor and current cache coherent mechanisms.<br />

The system has been implemented by simulation. Its performance is evaluated<br />

by seven benchmark applications. Evaluation results show that the CPR scheme<br />

outperforms flatten<strong>in</strong>g model <strong>in</strong> performance and scalability.<br />

The rest <strong>of</strong> this paper is organized as follows. Section 2 gives an overview <strong>of</strong><br />

transactional memory. Section 3 discusses transaction nest<strong>in</strong>g models and presents<br />

the CPR scheme which supports conditional partial rollback. Section 4 <strong>in</strong>troduces<br />

the architecture <strong>of</strong> our hardware transactional memory. Section 5 evaluates the<br />

system with benchmark applications. And Section 6 concludes the paper.<br />

2 Overview <strong>of</strong> Transactional Memory and Related Work<br />

The concept <strong>of</strong> transactional memory is first proposed <strong>in</strong> [1]. It def<strong>in</strong>es transaction<br />

as a sequence <strong>of</strong> <strong>in</strong>structions which is executed atomically, that is, a transactions is<br />

executed either completely (committed) or has no effect (aborted). The atomicity<br />

<strong>of</strong> a transaction is supported at the architecture level, either <strong>in</strong> hardware or s<strong>of</strong>tware.<br />

Dur<strong>in</strong>g the execution <strong>of</strong> a transaction, all the modifications to the data are<br />

buffered and <strong>in</strong>visible to the system, if a conflict between two transactions occurs<br />

due to read<strong>in</strong>g or writ<strong>in</strong>g to the same data, one <strong>of</strong> these transactions aborts its<br />

execution and rolls back. The transaction ends up with commit operation, which<br />

makes all the buffered modifications visible to the system.<br />

Compared to traditional lock-based programm<strong>in</strong>g model, transactional memory<br />

has a series <strong>of</strong> advantages: firstly, programmer only need to partition the<br />

transactions without consider<strong>in</strong>g synchronization and mutual exclusion among<br />

threads, so the transactional program is easy to write, and programmability is<br />

improved; secondly, the synchronization among transactions is done by the system<br />

automatically, and a transaction can be aborted and rolled back at anytime,<br />

so deadlock can be avoided; and thirdly, multiple transactions can be speculative<br />

executed concurrently, and rollback only occurs on conflict, as the result,<br />

performance <strong>of</strong> transaction programs can be improved.<br />

Accord<strong>in</strong>g to the implementation styles, current transactional memory system<br />

falls <strong>in</strong>to two categories: hardware transactional memory (HTM) and s<strong>of</strong>tware<br />

transactional memory (STM). HTM supports atomicity <strong>of</strong> transactions by hardware,<br />

and achieves high performance at the cost <strong>of</strong> resource limitations (e.g.<br />

size <strong>of</strong> a transaction); also the processor architecture must be modified. Typical

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!