252-0029-00L Parallel Programming

FS 2022

T. Hoefler, B. Solenthaler

Basic Information

  • Semester: Spring 2022
  • Course Number: 252-0029-00L
  • Lecturers: T. Hoefler, B. Solenthaler
  • Edoz: Open in Course Catalogue
  • Lectures: Tue, 10:15 - 12:00 and Wed, 14:15 - 16:00. HG F 7 with live streaming to HG F 5.
  • Exercises: Wed, 16:15 - 18:00 and Fri, 10:15 - 12:00.
  • Head TAs: Rafael Wampfler (first part), Timo Schneider (second part)
  • TAs: Prashanth Chandran,  Daniel Dorda,  Aurel Gruber,  Lasse Lingens,  Jingwei Tang,  Till Schnabel,  Nikola Kovacevic,  Cliff Hodel,  Julian Pieper,  Tim Kluser,  Alessandro Legnani,  Constantin Pinkl,  Kerim Birgi,  Andrei Ivanov,  Marcin Copik,  Saleh Ashkboos,  Salvatore Di Girolamo,  Shigang Li,  Lukas Gianinazzi,  Daniele Di Sensi 

News:

  • 05.01.22: Website online
  • 23.01.22: Moodle is online. All material is distributed over Moodle.
  • 22.02.22: First exercise published on Moodle. Exercise sessions start in the first week.
  • 22.02.22: Recordings of last year available on Moodle.
  • 02.03.22: Second exercise available on Moodle.
  • 04.03.22: The Zoom link changed for the exercise session of Group G-03 on Wednesday, March 9: https://ethz.zoom.us/j/3242113960.
  • 09.03.22: Group G-04 will be held online on Wednesday, March 9: https://ethz.zoom.us/j/63062551398.
  • 11.03.22: Group G-11 will be held online on Friday, March 11: https://ethz.zoom.us/j/3242113960.
  • 17.03.22: Group G-17 canceled on Friday, March 18.
  • 11.03.22: Group G-08 will be held online on Wednesday, March 23: https://ethz.zoom.us/j/4990150011.
  • 28.03.22: Group G-02 canceled on Wednesday, March 30.
  • 28.03.22: The exam preparation session will take place on Friday, April 8, 16:15 - 18:00 in HG F 7.
  • 29.03.22: Group G-01 will be held online on Wednesday, March 30: https://ethz.zoom.us/j/67819962694?pwd=OHlmVlBVR2JSU3ZBRmJHRzRDcjBiUT09.
  • 07.04.22: Group G-19 canceled on Friday, April 8.
  • 08.04.22: Group G-12 canceled on Friday, April 8.
  • 12.04.22: Group G-03 has a new zoom link: https://ethz.zoom.us/j/67425717881.
  • 13.04.22: Group G-10 has a new zoom link (see table below).

Overview

The purpose of this course is to introduce students to parallel programming. By the end of the course students will be able to design and implement working parallel programs in traditional (e.g., Java Threads) and emerging parallel programming models. Moreover, students will master fundamental concepts in parallelism and be able to reason about the correctness, performance, and the construction of parallel programs using different parallel programming paradigms (e.g., task parallelism, data parallelism) and mechanisms (e.g., threads, tasks, locks, communication channels). Finally, the course will examine how parallel programming methodologies can be applied in different algorithmic domains by investigating parallelization of algorithms.

Topics include:

  • Basic parallel programming concepts
  • Parallel programming using Java
  • Synchronization techniques
  • Case studies of building parallel programs starting from sequential algorithms

Course Content

Main text and reference book

  • Introduction to Java Programming, 2014. Daniel Liang. ISBN-13: 9780133813463
  • Java Concurrency in Practice, 2006. Brian Goetz, Tim Peierls, Joshua Bloch, Joseph Bowbeer, David Holmes, Doug Lea. ISBN-13: 9780321349606
  • The Art of Multiprocessor Programming, 2011. Maurice Herlihy, Nir Shavit. Morgan Kaufmann. Also available online in the ETH network.

Related resources, text and reference books

  • Sophomoric Parallelism and Concurrency (from: spac)
  • The Little Book of Semaphores
  • Programming concurrency on the JVM, 2011. Venkat Subramaniam
  • Structured Parallel Programming: Patterns for Efficient Computation, 2012. Michael McCool, Arch Robison, James Reinders.
  • Patterns for Parallel Programming, 2004. Timothy G. Mattson, Beverly A. Sanders, Berna L. Massingill.
  • A minicourse on multithreaded programming. Charles E. Leiserson, Harald Prokop.
  • (Optional) Inside the Java Virtual Machine. 2000. Bill Venners.

Introduction to Java books (freely available)

  • How to Think Like a Computer Scientist, 2012. Allen B. Downey.
  • Introduction to Programming Using Java, 2011. David J. Eck.

All material is available on Moodle.

  DateTitle
  Feb 22 Introduction & Course Overview
  Feb 23 Java Recap and JVM Overview
  Mar 1 Introduction to Threads and Synchronization (Part I)
  Mar 2 Introduction to Threads and Synchronization (Part II)
  Mar 8 Introduction to Threads and Synchronization (Part II)
  Mar 9 Parallel Architectures: Parallelism on the Hardware Level (Part I)
  Mar 15 Parallel Architectures: Parallelism on the Hardware Level (Part II)
  Mar 16 Basic Concepts in Parallelism
  Mar 22 Divide and Conquer, Cilk-style bounds
  Mar 23 Divide and Conquer, Cilk-style bounds
  Mar 29 ForkJoin Framework and Task Parallel Algorithms
  Mar 30 ForkJoin Framework and Task Parallel Algorithms / Shared Memory Concurrency, Locks and Data Races
  Apr 5 ForkJoin Framework and Task Parallel Algorithms / Shared Memory Concurrency, Locks and Data Races
  Apr 6 Shared Memory Concurrency, Locks and Data Races (High-level data races) / Fast Forward
  Apr 12 Data Races - Implementing locks with Atomic Registers
  Apr 13 Data Races - Implementing locks with Atomic Registers II
  Apr 26 Beyond Locks I: Spinlocks, Deadlocks, Semaphores
  Apr 27 Beyond Locks II: Semaphore, Barrier, Producer-/Consumer, Monitors
  May 3 Readers/Writers Lock, Lock Granularity: Coarse Grained, Fine Grained, Optimal, and Lazy Synchronization
  May 4 Lock tricks, skip lists, and without Locks I
  May 10 Without Locks II
  May 11 ABA Problem, Concurrency Theory
  May 17 Sequential Consistency, Consensus, Transactional Memory
  May 18 Consensus Hierarchy + Transactional Memory
  May 24 Transactional Memory + Message Passing
  May 25 Message Passing
  May 31 Consensus Proof and Reductions
  June 1 Parallel Sorting

Exercises

All material (exercise slides and exercises) is available on Moodle.

All exercises start in the first week of the semester.

Wednesday 16:15 - 18:00

  • Group G-01 (Andrei Ivanov, English): ETZ E 8
  • Group G-02 (Saleh Ashkboos, English): ETZ F 91
  • Group G-03 (Lukas Gianinazzi, German): https://ethz.zoom.us/j/67425717881
  • Group G-04 (Marcin Copik, German): CHN E 42
  • Group G-05 (Tim Kluser, German): ETZ J 91
  • Group G-06 (Cliff Hodel, German): HG E 33.5
  • Group G-07 (Alessandro Legnani, German): LFW C 11
  • Group G-08 (Constantin Pinkl, German): ML J 34.1
  • Group G-09 (Kerim Birgi, German): ML J 34.3

Friday 10:15 - 12:00

  • Group G-10 (Salvatore Di Girolamo, English): https://ethz.zoom.us/j/67711459297
  • Group G-11 (Cliff Hodel, German): HG G 26.5
  • Group G-12 (Lukas Gianinazzi, German): ML J 34.1
  • Group G-13 (Andrei Ivanov, German): NO D 11
  • Group G-14 (Tim Kluser, German): CHN D 42
  • Group G-15 (Shigang Li, English): CAB G 52
  • Group G-16 (Alessandro Legnani, German): ML H 34.3
  • Group G-17 (Constantin Pinkl, German): CLA E 4
  • Group G-18 (Kerim Birgi, German): IFW C 31
  • Group G-19 (Julian Pieper, German): NO E 11

Exercises

WeekTitleDue Date
  1 Introduction 28.02.2022
  2 Introduction to Multi-threading 07.03.2022
  3 Multi-threading 14.03.2022
  4 Parallel Models 21.3.2022
  5 Divide and Conquer 28.3.2022
  6 Task Parallelism 11.4.2022
  7 Synchronization And Resource Sharing 18.4.2022

Exam Prepration Session

The exam preparation session is scheduled at:

  • Friday, April 8, 16:15 - 18:00, HG F 7

The session is hosted by Alessandro Legnani and will be in German.

All material of the exam preparation session will be available on Moodle.

Exams and Grading

There is a written, centralized exam after the end of the semester. Exercise sessions are not graded.

  • 100% of grade determined by final Exam