CCSTM: A Library-Based STM for Scala

Nathan Grasso Bronson, Hassan Chafi, Kunle Olukotun · 2010

We introduce CCSTM, a library-based software transactional memory (STM) for Scala, and give an overview of its design and implementation. Our design philosophy is that CCSTM should be a useful tool for the parallel programmer, rather than a parallelization mechanism for arbitrary sequential code, or the sole synchronization primitive in a system. CCSTM expresses transactional reads and writes as explicit method calls on instances of a reference type. Scala’s flexible method names, implicit parameters, and closures keep the syntax concise, and the reference instances provide a natural way to express additional STM functionality. We use a novel hybrid of static and dynamic transaction scoping to retain composability while avoiding the barrier overheads that would otherwise result from an implementation as an unprivileged library. Experiments show that CCSTM’s performance and scalability are on par with bytecode rewriting STMs.

Read the paper · More papers on PaperTik