Course overview
Processors are no longer growing faster. Instead, they are growing ever more parallel. Hardware architects are no longer using the additional transistors afforded by Moore's Law to make sequential processors faster, but instead to put more processing cores on a single chip, leading to so-called chip multiprocessors, or simply multicore processors. Unfortunately, this creates a problem for us, programmers. Before the turn of the century, you could simply wait another year and your program would run faster on next-generation processors. This free lunch is now officially over: you'll have to learn how to successfully write concurrent and parallel programs if you want your programs' performance to continue to scale with the hardware capacity.
This year, the course will primarily involve programming in Java, Erlang and Clojure. All of these programming languages feature direct support for concurrent programming. If you question the usefulness of non-mainstream functional languages like Erlang and Clojure, I am not alone in thinking that the ideas embedded in these languages are important going forward. Here is a preliminary list of topics to be discussed:
- Multicore Processors: what and why?
- Parallelism: laws, scalability (speedup and efficiency)
- Hardware primer: architectures, caches, cache coherence
- Parallelism vs. Concurrency
- Parallelism: DAG model, fork/join, the Java Fork/Join framework
- Concurrency: shared-memory multithreading (in Java): locks, race conditions, deadlock
- Concurrency: message-passing models: channels (Occam-pi) and actors
- Actors in practice: an introduction to Erlang
- Google's MapReduce abstraction: parallel programming for data centers
- Practical functional programming: an introduction to Clojure
- Software-transactional memory
2011-2012 Schedule
| Date | Topic |
| 13/2 | Introduction, Laws of Parallel Programming, Hardware/Software Models |
| 20/2 | Erlang: introduction, sequential programming, concurrent programming |
| 27/2 | Exercises only |
| 05/3 | Erlang: distributed programming, fault tolerance, simple chat, multicore support |
| 12/3 | Parallelism: Fork/Join, Analysis of Fork/Join programs |
| 19/3 | Parallelism: Fork/Join Parallel Prefix
Concurrency: Shared-memory multithreading |
| 26/3 | Concurrency: Shared-memory multithreading
No exercises |
| 02/4 | Easter Holiday |
| 09/4 | Easter Holiday |
| 16/4 | Concurrency: Message-passing models (Actors vs Threads, Channels) |
| 23/4 | MapReduce, MapReduce in Erlang |
| 30/4 | Clojure: introduction, sequential programming, sequences |
| 07/5 | Clojure: persistent data structures, state and concurrency (refs, atoms, agents) |
| 14/5 | Software-transactional memory, meta-circular implementation in Clojure |
| 21/5 | STM in Clojure |
| 28/5 | Official Holiday |
Lecture 1: Introduction
Slides available on Pointcarre.
Source code
Required Reading:
Additional in-depth reading:
Lectures 2 & 3: Erlang
Slides available on Pointcarre.
Source code
Required Reading:
- Part 1 of Concurrent Programming in Erlang, freely available.
Additional in-depth reading:
Lectures 4 & 5: Fork/Join Parallelism
Slides available on Pointcarre.
Source code
Required Reading:
Additional in-depth reading:
Lectures 5 & 6: Shared-memory Concurrency
Slides available on Pointcarre.
Source code
Required Reading:
Additional in-depth reading:
Lecture 7: Message-passing Concurrency: Actors vs Threads, Channels
Slides available on Pointcarre.
Source code
Required Reading:
Additional in-depth reading:
Lecture 8: MapReduce
Slides available on Pointcarre.
Source code on github
Required Reading:
Additional in-depth reading:
Lectures 9 & 10: Introduction to Clojure, Concurrency in Clojure
Slides available on Pointcarre.
Source code
Required Reading:
Additional in-depth reading:
Lectures 11 & 12: Software-transactional Memory
Slides available on Pointcarre.
Source code on github
Required Reading:
Additional in-depth reading:
Assessment and examination
For the theoretical part of this course, students are expected to attend the lectures and to read the required reading material. For the exercises, students are expected to attend the lab sessions.
Examination is as follows:
- After each lecture, students participate in a short quiz via Pointcarré. Students get 1 week to participate. Participation will be valued more highly than strict correctness of the results. (20% of the total score)
- Examination will proceed via two programming projects:
- one to be solved in the Erlang programming language (40% of the total score)
- one to be solved in the Clojure programming language (40% of the total score)
Students must participate in all three tasks (quiz, Erlang project, Clojure project) in order to pass.
Full exam/project details.