Course pages 2016–17
Concurrent and Distributed Systems
Lecture notes
There are eight handouts available for the first part of the course (Concurrent Systems):
- Lecture 1: Introduction to concurrency, threads, and mutual exclusion
- Lecture 2: More mutual exclusion, semaphores, and producer-consumers
- Lecture 3: CCR, monitors, and concurrency in practice
- Lecture 4: Deadlock, livelock, and priority inversion
- Lecture 5: Concurrency without shared data, composite operations and transactions, and serialisability
- Lecture 6: Isolation vs struct isolation, 2-phase locking (PL), time stamp ordering (TSO), and optimistic concurrency control (OCC)
- Lecture 7: Crash recovery, lock-free programming, and transactional memory
- Lecture 8: Case study: FreeBSD kernel concurrency
Corrections/changes to slides after lecture
- Lecture 1:
An update has been made to Lecture 1 slide 11 to insert a missing "OS" block between "Proc(D)" and "Proc(A)", as asked about during the lecture.
- Lecture 2:
The online slides have been changed to use GNU rather than Intel assembler syntax (swapping operand orders for MOV instructions), as this may be more familiar to students.
- Lecture 3:
An update has been made to Lecture 3 slide 23 to replace "full" with "empty" in the "signal" popup for the procedure produce(). Some minor simplifications were made to the text in these popups, and also the corresponding popups in slides 15 and 19.
- Lecture 4:
Slide 9 has been updated to make it more clear that the resources in the illustration can have multiple owners.
- Lecture 7:
Slide 22 has been updated so that node numbers in the illustrated linked list are not covered up by the pop-ups.
- Lecture 8:
Minor typo and formatting fixes.
There are eight handouts available for the second part of the course (Distributed Systems):
- Lecture 1: Introduction to distributed systems; RPC
- Lecture 2: Network File System (NFS) and Object-Oriented Middleware (OOM)
- Lecture 3: Further RPC and OOM systems; Clocks
- Lecture 4: Clock synchronization; logical clocks
- Lecture 5: Consistent cuts, process groups, and mutual exclusion
- Lecture 6: Elections, distributed transactions, and replication
- Lecture 7: Replication, quorums, consistency, CAP, and Google datacenter case studies
- Lecture 8: PubSub; Security; NASD/AFS/Coda
Supervision material
Distributed Systems supervision questions will be posted in the Lent term.
- Concurrent and Distributed Systems - supervision questions 1: Semaphores, generalised producer-consumer, and priorities
- Concurrent and Distributed Systems - supervision questions 2: Transactions
- Concurrent and Distributed Systems - supervision questions 3: RPCs and time
- Concurrent and Distributed Systems - supervision questions 4: Transparency, RPC, distributed objects, leadership and replication
Corrections/changes to supervision questions
- Concurrent and Distributed Systems - supervision questions 2
Due to a formatting bug, the header for Question 2 (along with example transactions) was omitted from the generated PDF. This has now been corrected.
Additional material
Many of the ideas in concurrent systems can feel quite abstract in the absence of real-world experience; more glibly put, you can't understand a race condition without having debugged one! An introduction to concurrency primitives in Java, as well as several optional practical exercises, can be found here:
Last year’s course materials are still available.