CP: Concurrency: State Models and Design Patterns


Course: 21005 (Autumn Semester 2015)
Lecturer:Prof. Oscar Nierstrasz
Assistants:Haidar Osman, Leonel Merino, Nevena Milojković
Lecture:Wednesday, 10h15 - 12h00
Exercises:Wednesday, 12h00 - 12h45
Place:Engehaldenstrasse 8, 003
Repetition:Autumn 2015


This course provides an introduction to concurrent programming with Java. The course focuses on fundamental concepts important for developing correctly functioning concurrent programs, such as safety, liveness and fairness, and on standard programming patterns and techniques for dealing with these issues. The course will include two lab sessions (replacing the regular lecture hours) in which students will work in small groups to apply the techniques presented.

Much of the practical material in this lecture will be based on: Doug Lea, Concurrent Programming in Java: Design Principles and Patterns, Addison-Wesley, 1999. The theoretical foundations will be based on: Jeff Magee and Jeffrey Kramer, Concurrency: State Models & Java Programs, John Wiley, 1999.

Learning Outcomes

On successful completion of this course, you will be able to:

  • Reason about safety, liveness and fairness in concurrent programs
  • Use model-checking tools to prove safety and liveness properties
  • Use synchronization mechanisms to guarantee thread safety in programs
  • Reason about communication mechanisms to manage threads
  • Use practical techniques to avoid deadlock and ensure liveness
  • Reason about architectural styles to avoid concurrency issues


The final grade in the course will be based 20% on exercises and 80% on the final exam.

Course Schedule

  • Exercises rules are here
1 16-Sep-15 Introduction
2 23-Sep-15 Java and Concurrency
3 30-Sep-15 Safety and Synchronization
4 7-Oct-15 Safety Patterns + Transactional Memory
5 14-Oct-15 Liveness and Guarded Methods
6 21-Oct-15 Lab session (ExWi Pool)
7 28-Oct-15 Liveness and Asynchrony
8 4-Nov-15 Condition Objects
9 11-Nov-15 Fairness and Optimism
10 18-Nov-15 Lab session (ExWi Pool)
11 25-Nov-15 Petri Nets
12 2-Dec-15 Parallelism
13 9-Dec-15 Architectural Styles for Concurrency
14 16-Dec-15 Exam
Last changed by oscar on 10 August 2015