liveBook · Manning

Serial part

As explained in Grokking Concurrency

A sequential part is a portion of an algorithm whose operations must execute in an order that prevents independent parallel execution.

Imagine sorting a pile of cards with friends: searching separate piles can happen together, but dividing the pile and collecting results must happen in order. A serial part is the portion of an algorithm whose operations cannot be separated into independent parallel tasks. section 2.11

Searching index cards

Divide the cards into stacks (serial), search each stack for “concurrency” cards (parallel), then place the matches in a separate pile (serial). If the first and last steps take one second each and searching takes three seconds, two helpers reduce the total from five seconds to three—not to zero—because the serial parts remain. section 2.11

Serial parts place a ceiling on parallel speedup. Adding processors helps only the portion that can run independently; unavoidable ordering and coordination still contribute to total execution time. section 2.11

How Grokking Concurrency covers it

How deep it goes
Defines serial parts and works through algorithm steps, execution times, and a concrete speedup calculation.
Examples
Uses childbirth and index-card searching to contrast unavoidable ordering with independently searchable work.
What you can do after
Evaluate parallel speedup by separating serial and parallel steps and comparing their execution times.
How it connects
Connects serial parts to parallel algorithms, parallel execution, concurrency, processing resources, and Amdahl’s law.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Concurrency. The section links point to the parts of the book it draws on.