Practical Concurrent and Parallel Programming (PCPP) (PRCPP) E2015

Lecture plan

Course weekISO weekDateWhoSubjectMaterialsExercises
1 35 28 Aug 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 4 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 11 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 (2016 draft, 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 18 Sep PS Performance measurements. Sestoft: Microbenchmarks; Slides week 4; Exercises week 4; Example code: pcpp-week04.zip; Optional: McKenney chapter 3 Mandatory handin 2
5 39 25 Sep PS Threads and Locks: Tasks and the Java executor framework. Concurrent pipelines, wait() and notifyAll(). Goetz chapters 6, 8; Bloch items 68, 69; Slides week 5; Exercises week 5; Example code: pcpp-week05.zip Exercises week 5
6 40 2 Oct PS Threads and Locks: Performance and scalability; concurrent hash map case study. Goetz chapter 11, 13.5; Slides week 6; Exercises week 6; Example code: pcpp-week06.zip Mandatory handin 3
7 41 9 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 16 Oct Fall break
8 43 23 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 30 Oct PS Threads and Locks: Safety and liveness, absence of deadlock and livelock; the Java memory model. Goetz chapter 10, 13.1, 16; Bloch item 67; Optional: Java Language Specification section 17.4; Slides week 9; Exercises week 9; Example code: pcpp-week09.zip Exercises week 9
10 45 6 Nov PS 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 10; Exercises week 10; Example code: pcpp-week10.zip Mandatory handin 5
11 46 13 Nov PS Optimistic concurrency, lock-free data structures, Treiber stack, compare-and-swap. Goetz chapter 15; Slides week 11; Exercises week 11; Example code: pcpp-week11.zip Exercises week 11
12 47 20 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 12; Exercises week 12; Example code: pcpp-week12.zip Exercises week 12
  48 27 Nov   (Postponed due to illness).    
13 49 4 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 13; Exercises week 13 and Example code: see LearnIT Mandatory handin 6
14 50 11 Dec CB Message passing (no mutable shared memory), Erlang, Java+Akka. Slides week 14; Example code: see LearnIT No new exercises

Mandatory course materials

Optional course materials

Even more optional materials

Java resources

Archive


Peter Sestoft, Created 2015-06-01, last update 2016-02-10