A flexible framework for implementing software transactional memory

被引:55
作者
Herlihy, Maurice [1 ]
Luchangco, Victor [2 ]
Moir, Mark [2 ]
机构
[1] Brown Univ, Providence, RI 02912 USA
[2] Sun Microsyst Labs, Menlo Pk, CA USA
关键词
algorithms; experimentation; languages; software transactional memory (STM); transactions; concurrency; atomicity; obstruction-free factory; shadow factory; !text type='Java']Java[!/text] library;
D O I
10.1145/1167515.1167495
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We describe DSTM2, a Java(TM) software library that provides a flexible framework for implementing object-based software transactional memory (STM). The library uses transactional factories to transform sequential (unsynchronized) classes into atomic (transactionally synchronized) ones, providing a substantial improvement over the awkward programming interface of our previous DSTM library. Furthermore, researchers can experiment with alternative STM mechanisms by providing their own factories. We demonstrate this flexibility by presenting two factories: one that uses essentially the same mechanisms as the original DSTM (with some enhancements), and another that uses a completely different approach. Because DSTM2 is packaged as a Java library, a wide range of programmers can easily try it out, and the community can begin to gain experience with transactional programming. Furthermore, researchers will be able to use the body of transactional programs that arises from this community experience to test and evaluate different STM mechanisms simply by supplying new transactional factories. We believe that this flexible approach will help to build consensus about the best ways to implement transactions, and will avoid the premature "lock-in" that may arise if STM mechanisms are baked into compilers before such experimentation is done.
引用
收藏
页码:253 / 261
页数:9
相关论文
共 24 条
[1]   Unbounded transactional memory [J].
Ananian, CS ;
Asanovic, K ;
Kuszmaul, BC ;
Leiserson, CE ;
Lie, S .
11TH INTERNATIONAL SYMPOSIUM ON HIGH-PERFORMANCE COMPUTER ARCHITECTURE, PROCEEDINGS, 2005, :316-327
[2]  
[Anonymous], 1993, P S COMP ARCH ISCA
[3]  
*AP SOFTW FDN, BYT COD ENG LIB
[4]   Snapshots and software transactional memory [J].
Cole, C ;
Herlihy, M .
SCIENCE OF COMPUTER PROGRAMMING, 2005, 58 (03) :310-324
[5]  
Damron P, 2006, P 12 INT C ARCH SUPP
[6]  
FRASER K, CONCURRENT PROGRAMMI
[7]  
GUERRAOUI R, 2005, P 19 INT C DISTR COM
[8]  
Hammond Lance, 2004, P 31 ANN INT S COMP
[9]  
HARRIS T, 2003, P 18 ANN ACM SIGPLAN, P388, DOI DOI 10.1145/949305.949340
[10]  
Harris T., 2005, P 10 ACM SIGPLAN S P