Practical Concurrent and Parallel Programming (PCPP) (KSPRCPP1KU) E2018

Preliminary lecture plan

The script myj.sh seems to be a useful tool on the command line.

Note that the slides, exercises and code of this year's course will become available over time. Before that, the links are referencing the corresponding resource of last year's course.

Course weekISO weekDateWhoSubjectMaterialsExercises
1 35 31 Aug RJ 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 Handin Week 1
2 36 7 Sep RJ Threads and Locks: Designing thread-safe classes. Monitor pattern. Concurrent collections. Documenting thread-safety. Goetz chapters 4, 5; Bloch item 15; Slides week 2; Exercises week 2; Example code: pcpp-week02.zip Handin Week 2
3 37 14 Sep RJ Performance measurements. Sestoft: Microbenchmarks and supporting Java code; Slides week 3; Exercises week 3; Example code: pcpp-week03.zip; Optional: McKenney chapter 3 Handin Week 3
4 38 21 Sep RJ 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 4; Exercises week 4; Example code: pcpp-week04.zip. File with English words: words.zip Handin Week 4
5 39 28 Sep RJ 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 Handin Week 5
6 40 5 Oct RJ 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 Handin Week 6
7 41 12 Oct MC Threads and Locks: GUI applications. Cache coherence and performance consequences. Goetz chapters 9, 10.1-2; McKenney chapters 1-4; Slides week 7; Exercises week 7; Example code: pcpp-week07.zip Handin Week 7
42 20 Oct Fall break
8 43 26 Oct MC Threads and Locks: Testing concurrent programs. Goetz chapter 12; Herlihy and Shavit chapter 3; Slides week 8; Exercises week 8; Handin Week 8
9 44 2 Nov RJ 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; Eidenbenz, Wattenhofer 2011 paper; Slides week 9; Exercises week 9; Example code: pcpp-week09.zip Handin Week 9
10 45 9 Nov RJ Optimistic concurrency, lock-free data structures, Treiber stack, compare-and-swap. Consensus number. Goetz chapter 15; Herlihy and Shavit sections 5.1-5.2; Slides week 10; Exercises week 10; Example code: pcpp-week10.zip Handin Week 10
11 46 16 Nov RJ The Michael and Scott queue, progress concepts, Union Find, 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 Handin Week 11
12 47 23 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 on learnit Exercises week 12: see slides 50 and later Handin Week 12
13 48 30 Nov CB Message passing (no mutable shared memory), Erlang, Java+Akka. Slides week 13; Example code: see LearnIT No new Handin
14 49 7 Dec RJ Exam preparation See Archive

Mandatory course materials

Optional course materials

Even more optional materials

Java resources

Archive


Riko Jacob, Created 2018-08-27 based on Rikos previous and Peter Sestoft's version.