News

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

Introduction to Java books (freely available)

Presentation Schedule

All course materials are password protected using your ETHZ credentials.

  DateTitleSlides
  Feb 19 Introduction & Course Overview PDF
  Feb 20 Java Recap and JVM Overview PDF
  Feb 26/27 Introduction to Threads and Synchronization PDF
  Mar 5 Introduction to Threads and Synchronization PDF
  Mar 6/12/13 Parallel Architectures PDF
  Mar 19 Basic Concepts in Parallelism PDF
  Mar 20 Parallel Programming Models: Task and Data Parallelism PDF
  Mar 26/27 ForkJoin Framework and Task Parallel Algorithms PDF
  Apr 2 Shared Memory Concurrency, Locks and Data Races PDF
  Apr 9 Data Races, Solving Mutual Exclusion with Atomic Registers PDF
  Apr 10 Solving Mutual Exclusion for many processes, Hardware Primitives for mutual exclusion PDF
  Apr 16 Spinlocks, Deadlocks, Semaphores PDF
  Apr 17 Beyond Locks II: Semaphore, Barrier, Producer-Consumer, Monitors PDF
  Apr 30 Readers/Writers Lock, Lock Granularity: Coarse Grained, Fine Grained, Optimal, and Lazy Synchronization PDF
  May 7 Lock Tricks, Skip Lists, and Without Locks I PDF
  May 8 Without Locks II PDF
  May 14 Linearizability, Sequential Consistency, Consensus PDF
  May 15 Sequential Consistency, Consensus and Transactional Memory PDF
  May 21 Transactional Memory & Programming based on Message Passing PDF
  May 22 Finish STM & Distributed Memory Programming: Actors, CSP, and MPI PDF
  May 28 Message Passing & Parallel Sorting (A taste of parallel algorithms!) PDF

Exercises

Students should bring their laptops to the exercise sessions as most of the exercises involve programming.

  WeekTitleDue DateAssignmentSlidesSolution
  1 Introduction - PDF
  2 Introduction to Multi-threading 3.3.2019 PDFZIP PDF ZIP
  3 Multi-threading 10.3.2019 PDFZIP PDF ZIP
  4 Parallel Models 17.3.2019 PDF PDF PDF
  5 Divide and Conquer 24.3.2019 PDFZIP PDF ZIPPDF
  6 Task Parallelism 30.3.2019 PDFZIP PDF ZIPPDF
  7 Synchronization and Resource Sharing 7.4.2019 PDFZIP PDF ZIPPDF
  8 Synchronization II 14.4.2019 PDFZIP PDF PDF
  9 Beyond Locks 28.4.2019 PDFZIP PDF ZIPPDF
 10 Advanced Synchronization Mechanisms 13.5.2019 PDFZIP PDF ZIP
 11 Advanced Synchronization Mechanisms 20.5.2019 PDFZIP PDF ZIPPDF
 12 Consensus 27.5.2019 PDF PDF PDF
 13 Transactional Memory 3.6.2019 PDFZIP ZIP

Supplementary Materials

TitleSlides
Command Line Basics PDF

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


Old Exams
PDF2018 Summer Questions
PDF2018 Winter Questions
PDF2016 Summer Questions PDF2016 Summer Solution