Annotated Ada Reference ManualLegal Information
Table of Contents   Index   References   Search   Previous   Next 

Section 9: Tasks and Synchronization

1
{execution (Ada program) [partial]} The execution of an Ada program consists of the execution of one or more tasks. {task} {interaction (between tasks)} Each task represents a separate thread of control that proceeds independently and concurrently between the points where it interacts with other tasks. The various forms of task interaction are described in this section, and include: {parallel processing: See task} {synchronization} {concurrent processing: See task} {intertask communication: See also task}
1.a
To be honest: The execution of an Ada program consists of the execution of one or more partitions (see 10.2), each of which in turn consists of the execution of an environment task and zero or more subtasks. 
2
3
4
5
6
7
8
In addition, tasks can communicate indirectly by reading and updating (unprotected) shared variables, presuming the access is properly synchronized through some other kind of task interaction.

Static Semantics

9
{task unit} The properties of a task are defined by a corresponding task declaration and task_body, which together define a program unit called a task unit

Dynamic Semantics

10
Over time, tasks proceed through various states. {task state (inactive) [partial]} {inactive (a task state)} {task state (blocked) [partial]} {blocked (a task state)} {task state (ready) [partial]} {ready (a task state)} {task state (terminated) [partial]} {terminated (a task state)} A task is initially inactive; upon activation, and prior to its termination it is either blocked (as part of some task interaction) or ready to run. {execution resource (required for a task to run)} While ready, a task competes for the available execution resources that it requires to run. 
10.a
Discussion: {task dispatching policy} {dispatching policy for tasks} The means for selecting which of the ready tasks to run, given the currently available execution resources, is determined by the task dispatching policy in effect, which is generally implementation defined, but may be controlled by pragmas and operations defined in the Real-Time Annex (see D.2 and D.5).
NOTES
11
1  Concurrent task execution may be implemented on multicomputers, multiprocessors, or with interleaved execution on a single physical processor. On the other hand, whenever an implementation can determine that the required semantic effects can be achieved when parts of the execution of a given task are performed by different physical processors acting in parallel, it may choose to perform them in this way.

Wording Changes from Ada 83

11.a
The introduction has been rewritten.
11.b
We use the term "concurrent" rather than "parallel" when talking about logically independent execution of threads of control. The term "parallel" is reserved for referring to the situation where multiple physical processors run simultaneously.

Table of Contents   Index   References   Search   Previous   Next 
Ada-Europe Sponsored by Ada-Europe