AAU Student Projects - visit Aalborg University's student projects portal
A master's thesis from Aalborg University
Book cover


Language Integrated STM in C# Using the Roslyn Compiler: An Alternative to Locking

Translated title

Sprog Integreret STM i C# via Roslyn Compileren: Et Alternativ til Locking

Term

4. term

Publication year

2015

Submitted on

Pages

120

Abstract

This master thesis investigates whether language integrated STM is a valid alternative to locking in C# in terms of usability, and provides additional benefits compared to library-based STM. To do so, an extension of C# called AC# was implemented. AC# provides integrated support for STM, including conditional synchronization using the retry and orelse constructs, and nesting of transactions. AC# was implemented by extending the open source Roslyn C# compiler. To power AC# a librarybased STM system, based on the TLII algorithm, was implemented. The extended compiler transforms AC# source code to regular C# code which utilizes the STM library. For each concurrency approach: AC#, library-based STM and locking in C#, four different concurrency problems, representing different aspects of concurrency, were implemented. These implementations were analyzed according to a set of usability characteristics, facilitating a conclusion upon the usability of language integrated STM. Our evaluation concludes that AC# is a valid alternative to locking, and provides better usability than library-based STM.