skip to primary navigationskip to content

Course pages 2020–21

Concurrent and Distributed Systems



Lectures 1 to 8 are given by Dr DJ Greaves.

All lectures are pre-recorded this year. Please look under the 'Recordings' tab.

The audio content for the lecture videos, especially the first few, is very slowly spoken and monotonous. It is recommended that you replay them faster than real time in the first instance, such as 1.1x or so. And of course, pause as you need to. If you use mplayer, then the '[' and ']' keys are your friends.

For the first 8 sessions, assistance from the lecturer is likely to be available during the timetabled slot, starting at around 30 minutes past the hour. When a help session with the lecturer is currently available and active, the zoom link for the session, for local access only, will be HERE. (You may need reload/F5.)

Primary Resources

  • Lecture slides: PDF.

    Errata: L2: Assignment operator was missing from Bakery assignment of false to Enter[tid]. L2: half-coupled and fully-coupled asynchronous product both had arcs missing, so B0 is not finally a deadlock state.

  • Learners' Guide: LINK

  • Preliminary Exercises: Sheet 0.

  • Main Exercise Sheets: Sheet 1     Sheet 2.

  • Useful article on Java Concurrency Primitives: LINK.

  • Robert Watson's Java Concurrency Exercises: LINK (link broken).

  • Supervisors' Guide: See supervisors' area.

  • CBMC Model checker example demo: LINK (being updated Nov 2020).

Advanced Resources

For those with greater interest:

  • Two nice diagrams (thanks to Jasmin Jahic) that might be handy for supervision discussion:   and  

  • Detailed example of interrupt service routine: sp1-socparts.

  • Are SSD disk writes really atomic?.

  • Sources for real-world implementation of pthreads and condition variables condition variables.

  • Deadlock detection in AND-OR wait-for graphs: link missing.

  • Multicore CPUs without shared memory and with message passing hardware are marketed by companies such as XMOS.


Distributed Systems

Lectures 9 to 16 are given by Dr Martin Kleppmann.


Since going to print, the following updates have been made in the latest version of the lecture notes:

  • Added the last two lectures
  • Clarified that Raft provides FIFO-total order broadcast (not just total order broadcast), provided that when a follower sends a broadcast request to the leader, this is done via a FIFO link
  • Clarified that Raft's timeout for detecting leader failure is randomised, to reduce the probability of several nodes becoming candidates concurrently
  • Added a link to a visualisation of Raft
  • Changed notation "set x = v1" to "set(x, v1)" and "read x" to "get(x)" for consistency with later sections
  • On Raft slide 6, fixed the logic for updating currentRole and currentLeader (thank you to Rishabh Jain for reporting the mistake)
  • On Raft slide 8, line 3, changed the condition "success = true" to "success = true ∧ ack ≥ ackedLength[follower]"
  • On Slide 97 ("Read-after-write consistency"), changed "client does not read back the value it has read" to "client does not read back the value it has written"

Last year’s course materials are still available.

Instructions for lecturers: how to edit this page