Multicore Programming

2013-2014

Dept. of Computer Science, Vrije Universiteit Brussel
Cursusfiche (NL) | Content description (EN)

Lecturer: Tom Van Cutsem

Course schedule

For the principles behind this course, read my position paper or view the slides of my presentation at the Workshop on Curricula on Concurrency and Parallelism.

Examination details below.

Questions? Contact me.

Erlang Clojure

Course overview

Processors are no longer growing faster. Instead, they are growing ever more parallel. Hardware architects are no longer using the additional transistors afforded by Moore's Law to make sequential processors faster, but instead to put more processing cores on a single chip, leading to so-called chip multiprocessors, or simply multicore processors. Unfortunately, this creates a problem for us, programmers. Before the turn of the century, you could simply wait another year and your program would run faster on next-generation processors. This free lunch is now officially over: you'll have to learn how to successfully write concurrent and parallel programs if you want your programs' performance to continue to scale with the hardware capacity.

This year, the course will primarily involve programming in Java, Erlang and Clojure. All of these programming languages feature direct support for concurrent programming. If you question the usefulness of non-mainstream functional languages like Erlang and Clojure, I am not alone in thinking that the ideas embedded in these languages are important going forward. Here is a preliminary list of topics to be discussed:

Is this course for you? (aka prerequisites)

I don't expect students entering this course to have any prior knowledge on concurrency or parallelism (after all, that is the topic of this course). I do expect advanced programming skills. In particular, I will not be explaining standard sequential programming in Java (i.e. I assume you have basic knowledge of object-oriented programming in a mainstream OO language such as C++/Java/C#).

I will introduce standard sequential programming in Erlang and Clojure, so no prior knowledge of these languages is necessary. However, as both of these languages are primarily functional, having had prior exposure to a language with first-class functions and higher-order programming is a big plus. For VUB students, having followed the SICP courses (structure and intepretation of computer programs) should be sufficient. For ULB students, it is highly recommended to first take this course as an elective.

2013-2014 Schedule

DateTopic
12/2Introduction, Laws of Parallel Programming, Hardware/Software Models
19/2Erlang: introduction, sequential programming, concurrent programming
26/2Erlang: distributed programming, fault tolerance, simple chat, multicore support
05/3Java Concurrency: Introduction to concurrency in Java
Erlang project assignment announced
12/3Clojure: introduction, sequential programming, sequences
19/3Clojure: persistent data structures, state and concurrency (refs, atoms, agents)
26/3Clojure: software-transactional memory, meta-circular implementation in Clojure
Clojure project assignment announced
02/4Clojure: STM in Clojure
09/4Easter Holiday
16/4Easter Holiday
23/4Java Parallelism: Fork/Join, Analysis of Fork/Join programs
27/4Erlang project deadline
30/4Java Parallelism: Fork/Join Parallel Prefix
07/5Java Concurrency: Shared-memory multithreading
Java project assignment announced
14/5Concurrency: shared-memory wrap-up + message-passing models (Actors vs Threads)
18/5Clojure project deadline
21/5Concurrency: channels
15/6Java project deadline

Study material

The main study material used in this course are slides, which can be downloaded from Pointcarre. For each lecture, I also provide relevant pointers to the literature (mostly to articles, books or papers freely available online). You are expected to at least read up on the "required reading" material referenced below.

Lecture 1: Introduction

Slides available on Pointcarre.

Source code

Required Reading:

Additional in-depth reading:

Lectures 2 & 3: Erlang

Slides available on Pointcarre.

Source code

Good, compact overview of the core language:

Additional in-depth reading:

Lecture 4: Introduction to concurrency in Java

Slides available on Pointcarre.

Source code

Required Reading:

Additional in-depth reading:

Lectures 5 & 6: Introduction to Clojure, Concurrency in Clojure

Slides available on Pointcarre.

Source code

Required Reading:

Additional in-depth reading:

Lectures 7 & 8: Software-transactional Memory

Slides available on Pointcarre.

Source code on github

Required Reading:

Additional in-depth reading:

Lectures 9 & 10: Fork/Join Parallelism

Slides available on Pointcarre.

Source code

Required Reading:

Additional in-depth reading:

Lecture 11a: Advanced shared-memory Concurrency

Slides available on Pointcarre.

Required Reading:

Additional in-depth reading:

Lecture 11b: Message-passing Concurrency: Actors vs Threads

Slides available on Pointcarre.

Source code

Required Reading:

Lecture 12: Channel-based Concurrency

Slides available on Pointcarre.

Required Reading:

Additional in-depth reading:

Lecture 13 (Time permitting): MapReduce

Slides available on Pointcarre.

Source code on github

Required Reading:

Additional in-depth reading:

Assessment and examination

For the theoretical part of this course, students are expected to attend the lectures and to read the required reading material. For the exercises, students are expected to attend the lab sessions.

Examination for this course is fully project-driven:

There is no traditional written exam for this course. During the oral exam (~25min), we will discuss your projects. There is no need to prepare a formal presentation. You will be asked to sketch your design, discuss your experiments and relate your findings to the topics seen during the lectures.

Project schedule and deadlines 2013-2014

Project assignments are made available via Pointcarré.