Concurrent Programming: 2012-2013
Part A Core — Computer Science
Schedule B1 — Computer Science
Part A — Mathematics and Computer Science
Schedule B1(M&CS) — Mathematics and Computer Science
Hilary Term 2013 (16 lectures)
OverviewMany challenges arise during the design and implementation of concurrent and distributed programs. The aim of this course is to understand those challenges, and to see techniques for tackling them. The main paradigm to be considered is message passing concurrency, where independent processes, with private variables, interact by passing messages.
Learning outcomesAt the end of the course students are expected to understand:
- The conceptual foundations of concurrent programming, and
- A variety of effective ways of structuring concurrent and distributed programs.
This course combines well with the Concurrency course: Concurrent Programming helps provide motivation for Concurrency, while Concurrency helps to provide formal underpinnings for this course. This course will assume some familiarity with CSP; students who are not taking the Concurrency course (or have not taken such a course previously) should read at least the first two chapters of that course's textbook.
Students should also have a basic understanding of Object Oriented Programming (objects, classes, interfaces, inheritance, abstract classes, polymorphism), e.g. as taught in the Michaelmas Term OOP course or the first year Imperative Programming 2 course.
The course will have a number of practicals, to allow students to gain experience with concurrent programming. These practicals will use Scala; background reading on the language will be suggested.
- Introduction: reasons for concurrency; processes, threads; concurrent architectures; concurrent computing paradigms; safety and liveness; challenges of concurrent computing.
- Message passing concurrency; deadlock; piplines; fine-grained concurrency.
- Example: numerical integration using workers and a controller; bag of tasks.
- Alternation: syntax, semantics, examples.
- Client-server architectures.
- Interacting peers: patterns of interaction: centralised, fully-connected, ring and tree topologies.
- Synchronous data parallel computation.
- Monitors: syntax and semantics; examples.
- Patterns of concurrent computation: recursive parallel, bag of tasks with replacement, competition parallel, task parallel, map/reduce, revision of other patterns.
- Semaphores: syntax and semantic; examples; passing the baton.
SyllabusReasons for concurrency; processes, threads; safety and liveness. Message passing concurrency; deadlock. Clients and servers. Interacting peers. Synchronous parallel computation. Patterns of concurrent programming: data parallel; bag of tasks; recursive parallel; task parallel. Low-level concurrency controls: monitors; semaphores.
- Course textbook: Foundations of Multithreaded, Parallel, and Distributed Programming, Gregory R. Andrews, Addison-Wesley, 2000.
- Essential background reading:
- A Brief Scala tutorial, http://www.scala-lang.org/sites/default/files/linuxsoft_archives/docu/files/ScalaTutorial.pdf;
- Scala by Example, http://www.scala-lang.org/sites/default/files/linuxsoft_archives/docu/files/ScalaByExample.pdf
Students are formally asked for feedback at the end of the course. Students can also submit feedback at any point here. Feedback received here will go to the Head of Academic Administration, and will be dealt with confidentially when being passed on further. All feedback is welcome.