Software transactions with semi-mutable versioned variables

Copyright 2009-2011 © Gabriel Zs. K. Horvath

In this post I will introduce software transactions with semi-mutable versioned variables.

Introduction

Transactions have been around for a long time. They are typically associated with databases, but also commonly used in other areas such as source control systems and installers. Database transactions are the inspiration of memory transactions, either with hardware support or as software transactional memory. Every transactional system has its own variation; however they all share the fundamental concept of atomicity and provide some level of isolation. Transactions allow the concurrent execution of multiple execution threads while preserving the illusion of serial execution within each thread and preserving consistency.

Transactional systems tend to suffer from spurious conflicts which unnecessary fail transactions. These spurious conflicts are conflicts which have no valid semantic or logical origin. We will see how software transactions can help reduce or sometimes entirely remove these spurious conflicts.

Read more of this post

Advertisement

Join-calculus examples

In this post I will take you through a few examples of join-calculus.

Reader-writer lock

The reader-writer lock is a classic and important concurrency construct. It controls access to a share resource so that multiple readers can have concurrent access while the writer is given exclusive access.
Read more of this post

The join-calculus C# library

In this post I will take you through the main features of my join-calculus library.
Read more of this post

Join-calculus

A general trend in programming languages is to evolve towards higher levels of abstractions. For example the goto statement has been replaced by structured loop constructs. One of the main benefits of doing so is a massive improvement in readability. The standard concurrency constructs have not followed the same evolution; most of them are still low-level and haven’t changed much in the last thirty or forty years. Semaphores (1968) and monitors (1974) still form the concurrency basis for many “modern” languages such as Java and C#. These low-level constructs neither compose well, nor do they promote a modular approach; too often they result in programs which are difficult to understand and debug. So just like modular and structured programming facilitates abstraction and composition, we need to find similar models for concurrent programming.

Join-calculus is an elegant and simple yet powerful synchronization model. It is based on the pattern matching of messages and the execution of a block of code on matches. It was developed at INRIA in the 90’s and first implemented in JoCaml. Several implementations exist, either as libraries (e.g. Boost Join, Joins Concurrency Library) or as a language feature (Funnel, Join-Java, Cw/Polyphonic C#, MC#, VB, VODKA).
Read more of this post

Awelon Blue

Thoughts on Programming Experience Design

Joe Duffy's Blog

Adventures in the High-tech Underbelly

Design Matters

Furniture design blog from Design Matters author George Walker

Shavings

A Blog for Woodworkers by Gary Rogowski

randallnatomagan

Woodworking, life and all things between