liveBook · Manning

Concurrency

As explained in GPU Programming with Triton

Concurrency is the organization of multiple tasks so that their progress overlaps, often by interleaving work rather than executing tasks simultaneously.

Concurrency organizes independent tasks so they can make progress at the same time, often by switching between them. Parallelism means executing separate tasks simultaneously on multiple physical resources. Structuring work concurrently creates opportunities for parallel execution. section 1.3.1

For GPU work, the host organizes a problem into independent tiles; the device can compute many tiles at once. The work is concurrent in its structure and data-parallel in its execution. section 1.5

One cashier, several orders

A cashier switches between brewing one customer’s espresso and taking another customer’s payment. The orders progress concurrently, but not simultaneously; multiple cashiers serving different customers at once would be parallelism. section 1.3.1

Figure 1.4 In concurrency, a single worker (thread or core) switches between multiple tasks, giving the illusion of simultaneous progress. In parallelism, multiple workers execute separate tasks at the same instant.
CH01 F04 Fartale

Use the figure to compare one worker switching among tasks with multiple workers executing tasks simultaneously. section 1.3.1

How GPU Programming with Triton covers it

How deep it goes
Defines concurrency through task switching, contrasts it with simultaneous execution, and links it to GPU tile computation.
Examples
Uses a cashier switching between coffee orders and contrasts that with multiple cashiers serving customers simultaneously.
What you can do after
Understand how structuring independent tasks creates opportunities for multiple processors to execute them simultaneously.
How it connects
Connects concurrency to parallelism, data parallelism, and independent GPU tiles.

Also explained in

Compare how 31 books explain concurrency →

Related concepts

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