Parallel Computing Foundations
-
Concurrency and Parallel Execution
Concurrency organizes tasks whose execution can overlap in time. Parallel execution requires some work actually running at the same time.
-
Splitting Data into Independent Chunks
Data parallel work can apply one operation to several disjoint parts of input, then combine compatible results.
-
A Task Graph and Its Ready Work
A task graph describes dependencies and independent work. A task is ready when all its required predecessors have completed.
-
Work and Critical Path Length
Total work sums all task durations under a model. The critical path is the longest chain of dependent work and bounds an ideal schedule's completion time.
-
A Serial Fraction Limits Speedup
When a fixed workload has a part that must run serially, speeding up only the remaining part leaves a lower bound on total time.
-
Speedup and Efficiency for Parallel Work
Speedup compares elapsed time on a baseline with another configuration. Efficiency divides that speedup by the number of workers relative to a one-worker baseline.
-
Static and Dynamic Work Distribution
Static scheduling assigns parts in advance. Dynamic scheduling gives workers more work as they become available under a policy.
-
When One Worker Finishes Last
A phase needing all worker results cannot finish until its slowest required worker is done.
-
Waiting for a Parallel Phase at a Barrier
A barrier lets participating workers continue only after the expected participants have reached the synchronization point.
-
Interleavings of a Shared Counter
A counter increment may consist of a read, computation, and write. Interleaving those steps risks losing an intended update under an uncoordinated model.
-
Local Counters and a Final Reduction
Independent counters let workers accumulate part of a result without updating one shared cell on every item.
-
Combining Worker Results in a Reduction Tree
A reduction tree combines independent partial results in levels, potentially shortening the sequential chain of combination steps.
-
Repeatability in a Floating-Point Reduction
Floating-point additions can round differently under different groupings. Worker scheduling or chunk boundaries can expose that difference.
-
Protecting a Shared Record with a Lock
A lock can restrict a critical section to one participating worker at a time. Every relevant access needs to follow the supported protocol.
-
How Two Waiting Workers Can Deadlock
A cycle of waiting can prevent participants from reaching the releases that would let others proceed.
-
A Producer and Consumer with a Shared Buffer
A buffer can decouple production and consumption times while preserving a defined order or another delivery policy.
-
False Sharing on a Shared Cache Line
Workers updating different memory locations can still contend if those locations occupy the same cache line under a coherence protocol.
-
Sharing Read-Only Data Between Workers
Workers can use a common immutable input without coordinating write access to that input during their calculations.
-
Parallel Work on Matrix Rows
An operation can assign each output row to a worker when output writes are separate and any shared inputs remain suitably available.
-
Vector Width and the Last Partial Block
A vector operation can process several data elements per instruction under its representation. The final elements need a rule when length is not a multiple of that width.
-
Data Transfer and Work on an Accelerator
Moving data to or from another execution device can contribute to total time even when the computation on that device is short.
-
Contiguous Access and Data Layout
Reading neighboring elements in memory can use storage and cache behavior differently from visiting values separated by a large stride.
-
Different Execution Orders and Deterministic Results
Concurrent tasks may finish in another order than they were started. A deterministic result uses documented ordering or a combination rule that makes completion order irrelevant.
-
Testing Overlap at Known Synchronization Points
A parallel test can coordinate workers so important operations definitely overlap or occur in a particular sequence.
-
Keeping Output Positions in a Parallel Map
A parallel map can compute individual outputs independently while preserving their original positions at assembly.
-
Shared State and Messages in Parallel Programs
Parallel work can coordinate through shared objects or by sending explicit messages. Each choice needs rules about ownership and when values are visible.
-
Using One Parallel Result and Canceling the Rest
A parallel search can accept one result and stop unnecessary remaining work when its specification allows any valid witness.
-
Bounding Resources Across Parallel Workers
A per-worker resource need multiplies with active workers. Choose limits based on the shared environment and actual workload.
-
Reducing Communication with Local Work
A worker can combine data locally before sending partial results when the chosen summary preserves all needed information.
-
Checking Work Conservation in a Parallel Job
A data-parallel job should account for every intended input contribution even when tasks overlap or are retried.