Skip to main content

Forking processes

A fork node is a control node used within an activity diagram to represent the point where a single incoming control flow splits into multiple concurrent outgoing flows. The fork node is used to model parallel execution or concurrent behavior in a process.

  1. Splitting Control Flow

    A fork node is depicted as a diamond shape within the activity diagram. It typically has one incoming control flow and multiple outgoing control flows (usually represented as arrows).

  2. Parallel Execution

    When control reaches the fork node, it "forks" or splits into multiple concurrent paths, allowing multiple activities to be performed in parallel. Each outgoing flow represents a separate concurrent path of execution.

  3. No Synchronization

    Unlike a UML join node, a fork node does not involve synchronization or waiting for conditions to be met. It simply divides the control flow into parallel paths without any specific criteria.

  4. Independence

    The activities or actions that occur along each of the outgoing flows from the fork node are considered to be independent of each other. They can execute concurrently without any dependency on the execution of other paths.

  5. Concurrent Activities

    Typically, the outgoing flows from a fork node represent activities that can be performed simultaneously or in parallel. This can be useful for modeling scenarios where different parts of a process can happen concurrently, such as in parallel processing or multi-threaded systems.

  6. Join Node

    To bring the concurrent flows back together, you may use a join node in the activity diagram. A merge node is used to combine multiple control flows into a single flow. It is often used in conjunction with a fork node to model parallel execution followed by a convergence point.

Memory​

Every forked process operates on its own private memory but may access global memory via a reference.