Decomposition divides a program into distinct tasks and identifies which tasks can run concurrently. The key test is whether computations are sufficiently independent to execute together. section 10.0 section 10.1
Use task decomposition to turn a concurrent design into an explicit dependency and coordination problem:
- List the actions needed to complete the job. section 10.1
- Draw dependencies between actions; independent actions can proceed in parallel, while dependent actions must wait. section 10.1 section 10.1.1
- Choose granularity deliberately: fine-grained tasks increase parallelism but communication and synchronization, while coarse-grained tasks reduce coordination overhead. section 10.4
- Compare task decomposition with data decomposition, which partitions data so separate tasks can process it concurrently. section 10.4
Changing a flat tire
Applying the handbrake, unloading the spare, loosening nuts, jacking the car, replacing the tire, and stowing the old tire creates a dependency structure. Unloading the spare can overlap with loosening the nuts, while stowing the old tire waits until removal. section 10.1
Finding the longest words
Downloading web pages, extracting words, and finding the longest words form separate tasks, but each depends on the preceding task. The breakdown exposes where parallel execution is possible and where ordering is required. section 10.1.1
Use the task dependency graph to inspect which tire-changing actions can be assigned concurrently. section 10.1









