liveBook · Manning

Task mapping

As explained in Grokking Concurrency

Task mapping is the assignment of computational tasks to processors or other processing resources.

Task mapping assigns computational tasks to processors. Like giving different road-trip responsibilities to different people, it aims to ensure every resource has useful work while keeping the overall job moving efficiently. section 13.2

A good mapping balances two goals that can compete:

  • Place tasks that can run in parallel on different processors to increase concurrency. section 13.7
  • Keep tasks that interact often on the same processor to improve locality and reduce communication costs. section 13.7
  • Assign tasks statically or determine their placement at runtime with load-balancing algorithms. section 13.2

Matrix multiplication

A matrix-multiplication example leaves task mapping and scheduling to the operating system. For large tasks on distributed systems or specialized hardware, choosing an effective mapping matters more. section 13.7

How Grokking Concurrency covers it

How deep it goes
Compares parallel placement with locality, notes their tradeoffs, and defers detailed mapping algorithms.
Examples
Uses a road-trip task assignment analogy and matrix multiplication scheduled by the operating system.
What it assumes
Assumes tasks have been identified and may have been grouped through decomposition and agglomeration.
What you can do after
Evaluate task placements by balancing parallel execution, locality, communication costs, and processor utilization.
How it connects
Links mapping to task decomposition, agglomeration, load balancing, scheduling, locality, and communication costs.

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.