Official course description, subject to change:

Basic info last published 25/04-24
Course info
Language:
English
ECTS points:
7.5
Course code:
KSPRCPP2KU
Participants max:
160
Offered to guest students:
yes
Offered to exchange students:
yes
Offered as a single subject:
yes
Price for EU/EEA citizens (Single Subject):
10625 DKK
Programme
Level:
MSc. Master
Programme:
MSc in Computer Science
Staff
Course manager
Assistant Professor
Teacher
Adjunct Professor
Course semester
Semester
Efterår 2024
Start
26 August 2024
End
24 January 2025
Exam
Exam type
ordinær
Internal/External
ekstern censur
Grade Scale
7-trinsskala
Exam Language
GB
Abstract

This course is about that part of programming that focuses on parallelism and concurrency. It covers concurrency concepts that all universal to any programming language. The Java programming language is the main language used for practically addressing such aspects; and Erlang is also used for a topic in the course.


Description

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. The course places emphasis on how to reason about the correctness of concurrent programs.

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.
  • Reasoning about correctness of concurrent programs, happens-before relation and linearizability
  • Testing concurrent programs, 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, and the actors model using Erlang.




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. Being familiar with functional programming is also important.
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)
  • APPLY the actor model using Erlang to CONSTRUCT software that uses message passing concurrency
Ordinary exam
Exam type:
B: Oral exam, External (7-point scale)
Exam variation:
B22: Oral exam with no time for preparation.