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

Exam December 2017

Preliminary lecture plan

There will be a pre-course on Wednesday, August 30, at 13:00 in 2A54, on tools that are useful or required for the exercises. We will use benchmark.jar

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 1 Sep 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 8 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 15 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 3; Exercises week 3; Example code: pcpp-week03.zip. File with English words: words.zip Handin Week 3
4 38 22 Sep RJ Performance measurements. Sestoft: Microbenchmarks and supporting Java code; Slides week 4; Exercises week 4; Example code: pcpp-week04.zip; Optional: McKenney chapter 3 Handin Week 4
5 39 29 Sep RJ cancelled postponed
6 40 6 Oct 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
7 41 13 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
42 20 Oct Fall break
8 43 27 Oct RJ 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
9 44 3 Nov RJ 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 Handin Week 8
10 45 10 Nov RJ/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; Eidenbenz, Wattenhofer 2011 paper; Slides week 9; Exercises week 9; Example code: pcpp-week09.zip Handin Week 9
11 46 17 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
12 47 24 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
13 48 1 Dec 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
14 49 8 Dec CB Message passing (no mutable shared memory), Erlang, Java+Akka. Slides week 13; Example code: see LearnIT No new Handin

Mandatory course materials

Optional course materials

Even more optional materials

Java resources

Archive


Riko Jacob, Created 2017-08-24 based on Peter Sestoft's version.