Font Size: a A A

Programming with transactional memory

Posted on:2009-06-30Degree:Ph.DType:Thesis
University:Stanford UniversityCandidate:Carlstrom, Brian DavidFull Text:PDF
GTID:2448390005459733Subject:Computer Science
Abstract/Summary:
For decades the combination of Moore's law and innovations in uni-processor computer architecture have allowed most single-threaded applications to perform better on each subsequent processor generation. However, the power consumption and heat generation of recent generations of complex single-core processors ended this decades long progression and the trend has shifted to multi-core processors, often with simpler cores than found in earlier generations. In order to take advantage of the increasing number of cores found in new processors, single-threaded applications need to be rewritten to be parallel. The most common approach in a multi-core system is to use parallel threads sharing a common address space that use lock-based mutual exclusion to coordinate access to shared data. Unfortunately, writing a correct and scalable program using locks is considerably more difficult than the comparable sequential program. Programming with a few coarse-grained locks often limits scalability while using finer-grained locking often leads to significant overhead and risks issues such as deadlock.; Transactional memory is an alternative to locks for coordinating concurrent access to shared data in parallel programs. By allowing speculative concurrent access to shared data, both software and hardware transactional memory systems have been show to allow more scalability than locks on machines with one hundred or more cores. However, these results have focused on converting the use of short critical sections to transactions in existing parallel applications. Many hope that transactional memory will make parallel programming easier by allowing developers to reason about the interactions between fewer coarse-grained transactions that cover the majority of program execution.; The thesis of this dissertation is that supporting scalable performance similar to fine-grained locks with coarse-grained transactions requires going beyond simple atomic transactions to support transactional conditional waiting, as well as ways of reducing isolation between transactions. The analysis begins with JavaT, a transactional execution model for Java programs. While this model allows for a transactional evaluation of benchmarks such as SPECjbb2000 and JavaGrande, it also shows that there is no single interpretation of monitor-based conditional waiting that preserves the behavior of all existing Java programs. This leads to the definition of the Atomos transactional programming language, a Java derivative that includes features such as transactional conditional waiting, closed- and open-nested transactions, and transaction handlers.; To evaluate Atomos for executing programs with long transactions, a special version of SPECjbb2000 is created that spends most of its execution time executing transactions on a single shared warehouse data structure. The technique of semantic concurrency control is used to create transactional collection classes to enable the scalability of this SPECjbb2000 variant using Atomos nesting and handler support. Several techniques for dealing with non-transactional operations such as I/O are also discussed.
Keywords/Search Tags:Transactional, Programming, Transactions
Related items