Skip to main content

Tutorial II – Communication Between PEs

Lessons 4 to 7 of the main sequence. Lessons 1 to 3 ran one PE; these lessons connect several. They teach how values travel between PEs on colors and routes, how one PE runs several activities at once, when a send or a receive waits and how a program deadlocks, and how a PE runs code when a message arrives. Each lesson is a complete program of two to four PEs. Lessons 8 to 12 build rows and grids of PEs on these ideas.

LessonWhat it teaches
Lesson 4 — Sockets, wavelets, colors and routesSockets, wavelets, colors, route rules, multicast and its slowest receiver, coordinates
Lesson 5 — One core, many activities: parallel and FIFOsparallel, forever, FIFOs, tasks and microthreads, rect and union
Lesson 6 — Blocking, buffering and deadlockHow much the path between two PEs holds, a deadlock and three fixes, the communication ledger
Lesson 7 — Tasks: code that runs when a wavelet arrivesdispatch handlers, state between messages, named messages, handlers as tasks