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.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Trace a fork and join
  2. Use readiness to decide what to start
  3. Identify ready tasks as their prerequisites finish
  4. Separate dependencies from resource limits

Trace a fork and join

One read action produces inputs for two calculations, both needed for a final report. Once reading ends, both calculations can run. Topological ordering gives a sequential view of these dependencies.

Use readiness to decide what to start

Adding more workers cannot run the report early if its inputs are missing. Service dependencies give an example where waiting for the slow task determines elapsed time.[1]

Identify ready tasks as their prerequisites finish

In a task graph, A and B are independent, C depends on A, and D depends on both B and C. Starting A and B together is legal. C can become ready as soon as A finishes even while B continues. See topological task order.

Initially ready: A,B
After A: C can run
D waits until B and C are both done
A ready task may still wait for a worker

Separate dependencies from resource limits

The graph describes which work may run. A bounded executor controls how many tasks actually start. Test a shared successor with one parent deliberately delayed.

References

  1. OpenMP Architecture Review Board, OpenMP API Specifications ↩