Course syllabus

Principles of Concurrent Programming | TDA384/DIT391 (Jan 2021 - Mar 2021) 2020-2021

Course-PM

TDA384/DIT391 (Jan 2021 - Mar 2021) — Principles of Concurrent Programming — 2020-2021 (7,5hp)

Revised on 20 Jan 2021

Department of Computer Science and Engineering (CSE)

…to information on the course website.

Course purpose

This course provides an introduction to the principles underlying concurrent systems, as well as to practical programming solutions to use concurrency in programs.

Concurrent and parallel programming has become ubiquitous in modern software and systems, where concurrency is leveraged to exploit physical parallelism and speed up computations, to provide interactive multi-tasking, and to handle the interactions with asynchronous external events. This course aims to provide an introduction to the principles underlying concurrent systems, as well as to practical programming solutions for modelling and exploiting concurrency in programs. Domains where such principles and practices are relevant include operating systems, distributed systems, real-time systems, and multicore architectures.

The official course syllabus is available on the Chalmers student portal and the GU website.

Schedule

For details on the lectures, see the course plan below and the lectures page. For a detailed schedule (including room information), see TimeEdit.

Instructors and contact details

The primary means of communication for the course are:

  • This Canvas course room (CTH login/GU login) is the primary source of information about the course. All announcements will be made via Canvas (see announcements: CTH/GU).
  • The discussion forum is also hosted on Canvas (see forum: CTH/GU). There you can ask questions about the course to the teachers and to other students. Sharing solutions to labs is forbidden — on Canvas or anywhere else.
  • Zoom meeting for all lectures is here (Meeting ID: 682 7611 3749; Passcode: 357491) You must login to zoom in order to join.
  • Canvas is used for coordinating meeting with TAs during labs (see labs).
  • The course website contains information about the lectures (including lecture slides), about the weekly lab sessions, and about the exam (including old exams).
  • The Teacher’s mailing list, which you shouldn’t use unless you really need to contact the teachers via email — please use the discussion forum to ask questions that are of general interest!
  • The Fire system, where you can upload submissions to the labs.

Course responsibles

Teaching assistants (TAs)

The TAs are responsible for supervision of the lab sessions and grading.

Student representatives

  • For Chalmers University of Technology: to be announced

  • For the University of Gothenburg: to be announced

Course literature

(If you find any broken links here, please report them to the instructors by email, so we can fix them!)

Course textbooks

The lectures themselves are the ultimate reference for the course topics. Nevertheless, we refer you to the two official course textbooks for additional details. The course’s list of lectures mentions which chapters and sections of the textbooks are covered in each lecture.

  • M. Ben-Ari: Principles of Concurrent and Distributed Programming, 2nd Edition, Addison-Wesley

    The book has a website with downloadable slides and code examples

  • M. Herlihy & N. Shavit: The Art of Multiprocessor Programming, Morgan Kaufmann

    The book is available online through the Chalmers library and the GU library

  • An excellent resource for programmers new to Erlang, freely available as a web tutorial:

    F. Hébert: Learn You Some Erlang for Great Good! A Beginner’s Guide, No Starch Press, 1st edition, 2013

Additional reading

See the course literature page for additional resources.

Course plan

The course normally has two lectures per week. The lecture slides of each lecture are available on the course website and in Canvas latest the day before each lecture.

There are three supervised lab sessions per week. Students can attend any of the supervised lab session and receive help and tutoring from the supervising assistants on the lab assignments that are currently due. There are three labs, which require the students to give a brief demo to the teaching assistants during one of the designated lab sessions.

The course consists of the following lectures and labs.

Lectures (schedule is preliminary)

  1. Introduction to concurrent programming (Mon, 18 Jan 2021)
  2. Races, locks, and semaphores (Mon, 18 Jan 2021)
  3. Models of Concurrency and Synchronization Algorithms (Wed, 20 Jan 2021)
  4. Models of Concurrency and Sync Algs (Cont.) ++ Java Tutorial (Wed, 20 Jan 2021)
  5. Synchronization Problems with Semaphores (Fri, 22 Jan 2021)
  6. Monitors (Wed, 27 Jan 2021)
  7. Introduction to Functional Programming in Erlang (Wed, 27 Jan 2021)
  8. Message-passing concurrency in Erlang (Mon, 01 Feb 2021)
  9. Synchronization problems with message passing (Mon, 08 Feb 2021)
  10. Parallelizing computations (Wed, 10 Feb 2021)
  11. Parallel Linked Lists (Mon, 15 Feb 2021)
  12. Parallel Linked Lists (cont) and Lock-free programming (Wed, 17 Feb 2021)
  13. Lock-free programming (cont) (Wed, 17 Feb 2021)
  14. TBC: Concurrency in weak memory models (by Andreas Lööw) (Fri, 19 Feb 2021)
  15. Models and Languages of Concurrent computation (Mon, 22 Feb 2021)
  16. Models and Languages of Concurrent computation (cont.) (Wed, 24 Feb 2021)
  17. Guest Lecture: TBD (Mon, 01 Mar 2021)
  18. Verification of Concurrent Programs (Wed, 03 Mar 2021)
  19. Verification of Concurrent Programs (cont.) (Wed, 03 Mar 2021)
  20. Revision and exam preparation (Wed, 10 Mar 2021)
  21. Revision and exam preparation (cont.) (Wed, 10 Mar 2021)

Labs

  1. Trainspotting (deadlines: 4 February 2021, 19 March 2021)
  2. CCHAT (deadlines: 25 February 2021, 19 March 2021)
  3. A-mazed (deadlines: 12 March 2021, 19 March 2021)

Examination and grading

We will asset your knowledge of the content of the course both in the labs and in the final written exam. The course awards a total of 100 points: a maximum of 70 points for the exam, and a maximum of 30 points for the labs.

The exam takes place on 16 March 2021. Normally, you would be allowed to bring the following to the exam:

  • up to 2 textbooks
  • up to 4 two-sided sheets of A4 paper with notes (printed or handwritten),
  • an English dictionary

That said, as this year the exam is online we cannot restrict the amount of material you use for consultation. The use of Internet is not allowed though.

 

Exam grading

  • The exam is graded for Chalmers students as follows:

    Points

    Grade

    28–41

    3

    42–55

    4

    56–70

    5

  • The exam is graded for GU students as follows:

    Points

    Grade

    28–55

    G

    56–70

    VG

Labs grading

Each lab submission receives points when it is marked as passing; the amount of points depends on the lab and on how many of your previous submissions of the same lab were rejected.

Accepted at attempt #1 Accepted at attempt #2 Accepted at attempt #3
Lab 1 8 6 4
Lab 2 8 6 4
Lab 3 8 6 4

Each lab has a distinction part worth 2 points, available only on the first attempt. To get these 2 distinction points, submit a solution to the whole lab including the distinction part, at the first attempt. This allows the TAs to check the distinction part at the demonstration. Minor errors can be fixed in later attempts. If you do not submit a solution to the distinction part at the first attempt, you forfeit the 2 distinction points.

Overall grading

  • The overall grade for Chalmers students is determined as follows:

    • To pass the course, you need these points in each of the exam and labs:

      Exam

      Lab 1

      Lab 2

      Lab 3

      Minimum points to pass:

      28

      4

      4

      4

    • If you pass the course, the overall grade is determined based on the total points as follows:

      Points in Exam + Labs

      Grade

      40–59

      3

      60–79

      4

      80–100

      5

  • The overall grade for GU students is determined as follows:

    • To pass the course, you need these points in each of the exam and labs:

      Exam

      Lab 1

      Lab 2

      Lab 3

      Minimum points to pass:

      28

      4

      4

      4

    • If you pass the course, the overall grade is determined based on the total points as follows:

      Points in Exam + Labs

      Grade

      40–79

      G

      80–100

      VG

Learning objectives and syllabus

Knowledge and understanding:

  • demonstrate knowledge of the issues and problems that arise in writing correct concurrent programs;
  • identify the problems of synchronization typical of concurrent programs, such as race conditions and mutual exclusion.

Skills and abilities:

  • apply common patterns, such as lock, semaphores, and message-passing synchronization for solving concurrent program problems;
  • apply practical knowledge of the programming constructs and techniques offered by modern concurrent programming languages;
  • implement solutions using common patterns in modern programming languages

Judgment and approach:

  • evaluate the correctness, clarity, and efficiency of different solutions to concurrent programming problems;
  • judge whether a program, a library, or a data structure is safe for usage in a concurrent setting;
  • pick the right language constructs for solving synchronization and communication problems between computational units.

The official course syllabus is available on the Chalmers student portal and the GU website.

Course summary:

Date Details Due