Course week | ISO week | Date | Who | Subject | Materials | Exercises |
---|---|---|---|---|---|---|
1 | 35 | 2 Sep | PS | Concurrent and parallel programming, why, what is so hard. Threads and locks in Java, shared mutable memory, mutual exclusion, visibility, volatile fields, atomic operations, avoiding sharing (thread confinement, stack confinement), immutability, final, safe publication. | Goetz chapters 1, 2, 3; Sutter paper; McKenney chapter 2; Bloch item 66; Slides week 1; Exercises week 1; Example code: pcpp-week01.zip | Exercises week 1 |
2 | 36 | 9 Sep | PS | Threads and Locks: Designing thread-safe classes. Monitor pattern. Concurrent collections. Documenting thread-safety. | Goetz chapters 4, 5; Slides week 2; Exercises week 2; Example code: pcpp-week02.zip | Mandatory handin 1 |
3 | 37 | 16 Sep | PS | Java 8 parallel streams for bulk data and parallel array prefix operations. Functional interfaces, lambda expressions, method reference expressions. | Sestoft: Java Precisely 3rd edition (PDF excerpt, see LearnIT) sections 11.13, 11.14, 23, 24, 25; and associated example code. Slides week 3; Exercises week 3; Example code: pcpp-week03.zip. File with English words: words.zip | Exercises week 3 |
4 | 38 | 23 Sep | PS | Performance measurements. | Sestoft: Microbenchmarks and supporting Java code; Slides week 4; Exercises week 4; Example code: pcpp-week04.zip; Optional: McKenney chapter 3 | Mandatory handin 2 |
5 | 39 | 30 Sep | PS | Threads and Locks: Tasks and the Java executor framework. Concurrent pipelines, wait() and notifyAll(). | Goetz chapters 5.3, 6, 8; Bloch items 68, 69; Slides week 5; Exercises week 5; Example code: pcpp-week05.zip | Exercises week 5 |
6 | 40 | 7 Oct | PS | Threads and Locks: Concurrent hash maps: performance and scalability case study. | Goetz chapter 11, 13.5; Slides week 6; Exercises week 6; Example code: pcpp-week06.zip | Mandatory handin 3 |
7 | 41 | 14 Oct | PS | Threads and Locks: GUI applications. Cache coherence and performance consequences. | Goetz chapter 9; McKenney chapters 1-4; Slides week 7; Exercises week 7; Example code: pcpp-week07.zip | Exercises week 7 |
42 | 21 Oct | Fall break | ||||
8 | 43 | 28 Oct | PS | Threads and Locks: Testing concurrent programs. | Goetz chapter 12; Herlihy and Shavit chapter 3; Slides week 8; Exercises week 8; Example code: pcpp-week08.zip | Mandatory handin 4 |
9 | 44 | 4 Nov | AB | Transactional memory with Multiverse: Multiverse API Javadoc and file multiverse-core-0.7.0.jar. | Harris et al 2008 paper; Herlihy and Shavit sections 18.1-18.2; Cascaval et al 2008 paper; Slides week 9; Exercises week 9; Example code: pcpp-week09.zip | Exercises week 9 |
10 | 45 | 11 Nov | PS | Optimistic concurrency, lock-free data structures, Treiber stack, compare-and-swap. | Goetz chapter 15; Slides week 10; Exercises week 10; Example code: pcpp-week10.zip | Mandatory handin 5 |
11 | 46 | 18 Nov | PS | The Michael and Scott queue, progress concepts, work-stealing queues. | Michael and Scott paper and Chase and Lev paper sections 1, 2 and 5; Slides week 11; Exercises week 11; Example code: pcpp-week11.zip | Exercises week 11 |
12 | 47 | 25 Nov | CB | Introduction to message passing concurrency (no mutable shared memory), Introduction to Erlang, Introduction to Java+Akka. | Erlang chapter 1, 2, 5; Slides week 12; Exercises week 12: see slides 50 and later | Exercises week 12 |
13 | 48 | 2 Dec | CB | Message passing (no mutable shared memory), Erlang, Java+Akka. | Slides week 13; Example code: see LearnIT | Mandatory handin 6 is in lecture 12 slides 50 and later |
14 | 49 | 9 Dec | KFL, PS | (1) PS: Java vs C# memory model; (2) Ken Friis Larsen, DIKU: Using Rust's type system to control shared mutable memory and avoid some concurrency problems | Slides week 14: part 1; part 2; Example code: pcpp-week14.zip | No new exercises |
~/lib/jsr305-3.0.0.jar
, add import
javax.annotation.concurrent.GuardedBy;
to your Java source
files, and mention the jar file on the classpath when compiling Java
files, as in javac -cp ~/lib/jsr305-3.0.0.jar *.java