Concurrent Programming Paradigms, A Comparison in Scala

There is a rapid rise of multi-cores in recent hardware architectures. To exploit computational power of multi-core architectures, software should shift to be as concurrent as possible; and therefore should have concurrency control mechanisms. There are different concurrency programming paradigms such as locking and conditions, non-blocking algorithms, actors and software transactional memory (STM). There is a need to compare these approaches in terms of ease of use and performance. This work implements three fundamental cases of credit transfer, producer-consumer and token ring with different paradigms in Scala and the quantitative and qualitative results of the experiments are presented. Besides an STM implementation in Scala is presented.

Related material