Official course description:
Full info last published 15/05-23

Practical Concurrent and Parallel Programming, MSc CS

Course info
ECTS points:
Course code:
Participants max:
Offered to guest students:
Offered to exchange students:
Offered as a single subject:
Price for EU/EEA citizens (Single Subject):
10625 DKK
MSc. Master
MSc in Computer Science
Course manager
Assistant Professor
Adjunct Professor
Course semester
Efterår 2023
28 August 2023
26 January 2024
Exam type
ekstern censur
Grade Scale
Exam Language

This course is about that part of programming that focuses on parallelism and concurrency. The Java programming language is the language used for practically addressing such aspects.


Parallel and Concurrent Programming used to be an exception in the past: it is now the norm and all software systems are mostly made by several entities concurrently interacting with each other. Therefore, it is extremely important that computer science graduates acquire this knowledge.

In this course you learn how to write correct and efficient concurrent and parallel software, primarily using Java, on standard shared-memory multicore hardware such as laptops, desktops and servers.

The course covers basic mechanisms such as threads, locks and shared memory as well as more advanced mechanisms such as functional parallel stream operations, message passing, and lock-free data structures implemented using atomic compare-and-swap instructions. It covers concepts such as atomicity, safety, liveness and deadlock. It covers how to measure and understand performance and scalability of parallel programs. It covers tools and methods to find bugs in concurrent programs, and reason about their correctness.

Topics covered include:

* Threads and locks in Java, shared mutable memory, mutual exclusion, deadlock, starvation, atomic operations, avoiding sharing (thread confinement), designing thread-safe classes, the monitor pattern.

* Visibility, volatile, immutable objects, final, the Java memory model.

* Functional programming, stream pipelines for bulk data, parallel operations on streams and arrays.

* Performance and scalability, performance measurements, scalability case studies: concurrent hashmap, parallel quicksort.

* Thread pools, the Java executor framework, work-stealing queues, Futures.

* Concurrency and single-threaded GUI applications.

* Testing concurrent programs, correctness, safety and liveness properties, testing tools.

* Optimistic concurrency, lock-free data structures (lists, stacks and queues), compare-and-swap, progress concepts and how to implement a lock.

* Message passing concurrency, using the Java Akka framework.

Formal prerequisites
Students must know the Java programming language very well, including: inner classes, generics, a first exposure to threads and locks, and event-based graphical user interfaces.
Intended learning outcomes

After the course, the student should be able to:

  • ANALYSE the correctness of concurrent Java software, and RELATE it to the Java memory model
  • ANALYSE the performance of concurrent Java software
  • APPLY Java threads and related language features (locks, final and volatile fields) and libraries (concurrent collections) to CONSTRUCT correct and well-performing concurrent Java software
  • USE software tools for accelerated testing and analysis of concurrency problems in Java software
  • COMPARE different communication mechanisms (shared mutable memory and message passing)
Learning activities

Teaching consist of lectures and exercises, some of which are mandatory hand-ins. The examination, which emphasizes construction, measurement and reflection, is closely aligned with the intended learning outcomes. The weekly exercises facilitate independent understanding and practical skills in implementing and empirically evaluating the software concepts taught in the course. As learning activities, doing the exercises enable the students to perform according to the intended learning outcomes, including but not limited to passing the exam.

Mandatory activities

The pedagogical purpose of the mandatory activities is to put into practice the concepts presented in the lectures. There will be regular (weekly or bi-weekly) mandatory activities, which must be handed-in. As a prerequisite for taking the exam, 80% of the hand-ins must be approved. There will be a final submission for non-approved activities. 

There may be (weekly or bi-weekly) oral feedback sessions where you will present your hand-in. It is also possible to opt for written feedback. The feedback for the final submission (for non-approved hand-ins) will be written.

The student will receive the grade NA (not approved) at the ordinary exam, if the mandatory activities are not approved and the student will use an exam attempt.

Course literature
  • Goetz, B., Peierls, T., Lea, D., Bloch, J., Bowbeer, J., & Holmes, D. (2006). Java concurrency in practice. Pearson Education.
  • Herlihy, M., Shavit, N., Luchangco, V., & Spear, M. (2020). The art of multiprocessor programming. Newnes.

Student Activity Budget
Estimated distribution of learning activities for the typical student
  • Preparation for lectures and exercises: 30%
  • Lectures: 12%
  • Exercises: 12%
  • Assignments: 30%
  • Exam with preparation: 16%
Ordinary exam
Exam type:
B: Oral exam, External (7-point scale)
Exam variation:
B22: Oral exam with no time for preparation.
Exam duration per student for the oral exam:
30 minutes

Exam type:
B: Oral exam, External (7-point scale)
Exam variation:
B22: Oral exam with no time for preparation.
Exam duration per student for the oral exam:
30 minutes

Time and date
Ordinary Exam Mon, 15 Jan 2024, 09:00 - 21:00
Ordinary Exam Tue, 16 Jan 2024, 09:00 - 21:00
Ordinary Exam Wed, 17 Jan 2024, 09:00 - 21:00
Ordinary Exam Thu, 18 Jan 2024, 09:00 - 21:00
Ordinary Exam Fri, 19 Jan 2024, 09:00 - 21:00
Ordinary Exam Mon, 22 Jan 2024, 09:00 - 21:00
Ordinary Exam Tue, 23 Jan 2024, 09:00 - 21:00
Ordinary Exam Wed, 24 Jan 2024, 09:00 - 21:00
Ordinary Exam Thu, 25 Jan 2024, 09:00 - 21:00
Ordinary Exam Fri, 26 Jan 2024, 09:00 - 21:00