Concurrent and Distributed Programming

Multi-Core machines, interconnected computers and heterogeneous computing environments have become ubiquitous. Writing programs utilising these computer’s resources to their fullest involves writing multi-threaded and distributed programs.

Participants learn to write such programs in, for example, the C Programming Language using the pthreads API, Erlang, or the Go Programming Language. They learn to avoid unintended nondeterministic effects, deadlocks and structure concurrent and distributed programs.

We repeat the basics of threads, processes, semaphores and mutexes. Then, the students learn patterns to structure algorithms for concurrent execution. They will learn basic architectures (recursive parallelism, iterative parallelism, mesh parallelism, and bag of tasks). We consider programming with semaphores, monitors, and with transactional memory.

After understanding the problems of shared variable concurrency and its difficulty, we consider distributed message-passing systems. One can avoid many issues of shared variable programs by encapsulating a state and decoupling the control flow with messaging.

Participants learn to structure distributed applications and understand their architecture. They will also consider coordination methods that describe how the processes in a distributed system achieve a common goal. The students will implement a distributed system in the Go Programming Language.

The Go Programming language is a programming language in the tradition of C, Algol, and Modula. It is a statically typed language. The module system allows scaling to large systems. It aims at productive and readable code and integrates multiprocessing at the language level.

In the end, participants can demonstrate a concurrent application, explain how to construct it, and justify the properties of the application. They understand the trade-offs of the language mechanism and know the structural similarities and differences it exhibits.