COMP 322: Fundamentals of Parallel Programming (Spring
...
2025)
InstructorsInstructor: | Mackale Joyner, DH 2063 |
|---|
Zoran Budimlić, DH 3003 Adrienne Li, Austin Hushower, Claire Xu, Diep Hoang, Hunena Badat, Maki Yu, Mantej Singh, Rose Zhang, Victor Song, Yidi Wang | | Admin Assistant: | Annepha Hurlock, annepha@rice.edu , DH 3122, 713-348-5186 | | |
Piazza site: | https://piazza.com/rice/spring2022/comp322 (Piazza is the preferred medium for all course communications) | Cross-listing: | ELEC 323 |
|---|
Lecture location: | Herzstein |
|---|
Amphitheater (online 1st 2 weeks)Amp | Lecture times: | MWF 1:00pm - 1:50pm |
|---|
Lab |
|---|
locationsKeck 100 (online 1st 2 weeks) times50pm (Austin, Claire)Wed 4:30pm - 5:20pm (Hunena, Mantej, Yidi, Victor, Rose, Adrienne, Diep, Maki)
Course Syllabus
Course Syllabus
A A summary PDF file containing the course syllabus for the course can be found here. Much of the syllabus information is also included below in this course web site, along with some additional details that are not included in the syllabus.
...
- Fork-Join Parallelism with a Data-Structures Focus (FJP) by Dan Grossman (Chapter 7 in Topics in Parallel and Distributed Computing)
- Java Concurrency in Practice by Brian Goetz with Tim Peierls, Joshua Bloch, Joseph Bowbeer, David Holmes and Doug Lea
- Principles of Parallel Programming by Calvin Lin and Lawrence Snyder
- The Art of Multiprocessor Programming by Maurice Herlihy and Nir Shavit
Lecture Schedule
...
20222025) | Lecture | Assigned Reading | Assigned Videos (see Canvas site for video links) | In-class Worksheets | Slides | Work Assigned | Work Due | Worksheet Solutions |
|---|
1013 | Lecture 1: Introduction |
| slides | | | 1215 | Lecture 2: Functional Programming |
GList.java | | | | WS2-solution | | 14| 17 | Lecture 3: Higher order functions |
| worksheet3 slides 17 | | | | | | | | 1922 | Lecture 4: Lazy Computation |
LazyList.java Lazy.java | | | | | | 2124 | Lecture 5: Java Streams |
| 24| 27 | Lecture 6: Map Reduce with Java Streams | Module 1: Section 2.4 | Topic 2.4 Lecture, Topic 2.4 Demonstration | worksheet6 | lec6-slides |
| | 2629 | Lecture 7: Futures | Module 1: Section 2.1 | Topic 2.1 Lecture , Topic 2.1 Demonstration | worksheet7 | lec7-slides |
| | 2831 | Lecture 8: Async, Finish, Computation Graphs |
, Ideal Parallelism232 2 | 1 Demonstration, Topic 1. |
3 3 lec8 | Jan 31 | Async, Finish| Ideal Parallelism, Data-Driven Tasks | Module 1: Section 1. |
1 1 1 | | 02| 05 | Lecture 10: Event-based programming model |
| | | 04| 07 | Lecture 11: GUI programming |
as an example of event-based,futures/callbacks in GUI programming, Scheduling/executing computation graphs
| Module 1: Section 1.4 | Topic 1.4 Lecture , Topic 1.4 Demonstration |
| Homework 1 07Scheduling/executing computation graphs| Abstract performance metrics, Parallel Speedup, Amdahl's Law | Module 1: Section 1. |
44 4 | | 09 Parallel Speedup, Critical Path, Amdahl's Law Accumulation and reduction. Finish accumulators | Module 1: Section |
15 15 , 15 | 1114 | No class: Spring Recess |
| | | | | | | | 14 Accumulation and reduction. Finish accumulatorsData Races, Functional & Structural Determinism | Module 1: |
Section 3| 6 | Topic 2.5 Lecture , Topic 2.5 Demonstration, Topic 2. |
3 3 | | 16 Recursive Task Parallelism | | | WS15 | 18 Data Races, Functional & Structural DeterminismModule 1: Sections 2.5, 2.6 | Topic 2.5 Lecture , Topic 2.5 Demonstration, Topic 2.6 Lecture, Topic 2.6 DemonstrationHomework 2 | | 2124 | Lecture 17: Midterm Review |
| | | | | | 23 | | worksheet18 | Limitations of Functional parallelism.
Abstract vs. real performance. Cutoff Strategy | WS18-solution | | | 25 | 28 | Lecture 19: Fork/Join programming model |
. OS Threads. Scheduler Pattern Module 1: Sections 2.7, 2.8 | Topic 2.7 | Lecture, Topic 2.7 Demonstration, Topic 2.8 Lecture, Topic 2.8 Demonstration |
, | Feb 28 Confinement & Monitor Pattern. Critical sections
Global lock Module 2: Sections 5.1, 5.2, 5.6 | Topic 5 Data-Parallel Programming model. Loop-Level Parallelism, Loop Chunking | Module 1: Sections 3.1, 3.2, 3.3 | Topic 3.1 Lecture, Topic |
5| 3.1 Demonstration , Topic |
5 Topic 5| Topic 3.2 Demonstration, Topic |
56 Topic 56 | | 02 Atomic variables, Synchronized statements Barrier Synchronization with Phasers | Module |
2 5.4, 7.2 5 5worksheet21 | , Topic 7.2 Lecture | | 04Parallel Spanning Tree, other graph algorithms Stencil computation. Point-to-point Synchronization with Phasers | Module 1: Sections 4.2, 4.3 | Topic 4.2 Lecture, Topic 4.2 Demonstration, Topic 4.3 Lecture, Topic 4.3 Demonstration | worksheet22 | lec22-slides |
|
| WS22-solution |
| | worksheet22 | lec22-slides | Homework 4 | Homework 3 | WS22-solution | 07 Java Threads and LocksFuzzy Barriers with Phasers | Module |
2 Sections 7, 7.3Topic 7 73 Lecture | | 09 Java Locks - Soundness and progress guarantees Confinement & Monitor Pattern. Critical sections Global lock | Module 2: |
7 7 Lecture worksheet24 | lec24-slides | | | .1 Demonstration, Topic 5.2 Lecture, Topic 5.2 Demonstration, Topic 5.6 Lecture, Topic 5.6 Demonstration | worksheet24 | lec24-slides |
| 11 Dining Philosophers Problem | Atomic variables, Synchronized statements | Module 2: Sections 5.4, 7. |
6Topic 7.6 Lecture | | | | Mon | Mar 14 | | | | | | | 16 | | | | | | | | 18 | | | | | | | 21 N-Body problem, applications and implementations Java Threads and Locks | Module 2: Sections 7.1, 7.3 | Topic 7.1 Lecture, Topic 7.3 Lecture |
| | | 2326 | Lecture 27: Read-Write Locks, |
Linearizability of Concurrent Objects Soundness and progress guarantees | Module 2: Section 7.3 |
, 7.4 | Topic 7.3 Lecture, Topic 7. |
4 | | 25 Message-Passing programming model with ActorsModule 2: 6.1, 6.2 | Topic 6.1 Lecture, Topic 6.1 Demonstration, Topic 6.2 Lecture, Topic 6.2 Demonstration | | | 28 Active Object Pattern. Combining Actors with task parallelism Linearizability of Concurrent Objects | Module 2: |
6.3, 6 6.3 Lecture, Topic 6.3 Demonstration, Topic 6.4 Lecture, Topic 6.4 Demonstration | | | Mar 30 Task Affinity and locality. Memory hierarchy | | worksheet30 | lec30-slides | | | WS30-solution | | | Fri | Apr 01 | Lecture 31: Data-Parallel Programming model. Loop-Level Parallelism, Loop Chunking | Module 1: Sections 3.1, 3.2, 3.3 | Topic 3.1 Lecture, Topic 3.1 Demonstration , Topic 3.2 Lecture, Topic 3.2 Demonstration, Topic 3.3 Lecture, Topic 3.3 Demonstration | worksheet31 | lec31-slides | Homework 5 | Homework 4 | WS31-solution | 04 32: Barrier Synchronization with PhasersModule 1: Section 3.4 | Topic 3.4 Lecture, Topic 3.4 Demonstration | worksheet32 | lec32-slides | | | WS32-solution | | | Wed | Apr 06 | Lecture 33: Stencil computation. Point-to-point Synchronization with Phasers | Module 1: Section 4.2, 4.3 | Topic 4.2 Lecture, Topic 4.2 Demonstration, Topic 4.3 Lecture, Topic 4.3 Demonstration | worksheet33 | lec33-slides | | | WS33-solution | |
|---|
| Fri | Apr 08 | Lecture 34: Fuzzy Barriers with Phasers | Module 1: Section 4.1 | Topic 4.1 Lecture, Topic 4.1 Demonstration | worksheet34 | lec34-slides | | | | |
|---|
13 | Mon | Apr 11 | Lecture 35: Scan Pattern. Parallel Prefix Sum | | | worksheet35 | lec35-slides | | | | |
|---|
| | Wed | Apr 13 | Lecture 36: Parallel Prefix Sum applications | | | worksheet36 | lec36-slides | | | | |
| | Fri | Apr 15 | Lecture 37: Eureka-style Speculative Task Parallelism | | | worksheet37 | lec37-slides | | | | |
| 14 | Mon | Apr 18 | Lecture 38: Overview of other models and frameworks | | | | lec38-slides | | | | |
| Wed | Apr 20 | Lecture 39| : Course Review (Lectures 19- |
38lec39 | | | | | | 22 40| 39: Course Review (Lectures 19- |
38 | | | lec40-slides | | Homework 5 | |
Lab Schedule
20222025) | Topic | Handouts | Examples |
|---|
1 | Jan |
|---|
10 |
|
| - | Jan 20 | No lab this week (MLK) |
|
|
|---|
| 2 | Jan |
|---|
17 Jan 24 | Java Streams | Jan 31 | Futures | lab4-handout | | 5 07lab56 | 14Async / Finish | lab6-handout | 21| 24 | No lab this week (Midterm Exam) |
7 | Feb 28 | Recursive Task Cutoff Strategy | lab7 8 07Java Threads | | 10 | Recursive Task Cutoff Strategy | lab6 |
lab8 14| 17 | No lab this week (Spring Break) |
| | | 9 | Mar 21 | Concurrent Lists | lab9-handout | |
|---|
| 10 | Mar 28 | Actors | lab10-handout | |
|---|
| 11 | Apr 04 | Loop Parallelism | lab11-handout | |
|---|
- | Apr 11 | | | |
|---|
- | Apr 18 | | | Grading, Honor Code Policy, Processes and Procedures
...
Labs must be submitted by the following Wednesday at 4:30pmFriday at 4pm. Labs must be checked off by a TA.
...