# Execution Graph

The breakdown of a function into tasks is represented as a **directed acyclic graph (DAG)**, called the **execution graph**. The graph consists of:

* **Nodes (Tasks):** Each task in the function is a node in the graph.
* **Edges (Dependencies):** Directed edges between tasks represent dependencies, meaning one task must be completed before another can start.

<figure><img src="/files/cI927mMP5w9sAUiSjQyd" alt=""><figcaption><p>Execution graph example</p></figcaption></figure>

Key Features of the Execution Graph

1. **Dynamic Refinement:**\
   The orchestration layer can break tasks into smaller subtasks if needed, allowing for more flexible and efficient scheduling.
2. **Instruction Expansion:**\
   Composite instructions within tasks can be expanded into their atomic components, ensuring they can be executed by available resources.

This adaptability allows the system to optimize task execution based on available resources and workload while maintaining proper dependency order.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fairmath.xyz/fhe-computer/operating-system/execution-graph-and-tasks/execution-graph.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
