The basic textual concept in Ada is that of a task, which in form is closely analogous to a package. Tasks are automatically executed in parallel with the unit in which they are declared, and their termination similarly follows the scope structure. Task types enable the declaration of a dynamic number of tasks with similar properties. This facility, when used in conjunction with access types, allows flexible control over the number of tasks in a system and the manipulation of task identities.
Communication and synchronization are both achieved using the concept of a rendezvous between a task issuing an entry call and a task accepting the call by an accept statement. An entry call is similar to a procedure call except that the calling and called tasks are distinct and synchronized.
Timing control is provided by the delay statement together with a package that defines operations on times and dates.
Great power is provided by the select statement, which enables a task to respond to several different possible entry calls. Variants of the select statement provide timed-out and conditional communication in a natural manner. Interrupts may be handled by a representation clause associated with a particular entry.
This chapter comprises two main parts. The first describes the tasking facilities and illustrates their use with examples. This is followed by a brief historical survey of parallel processing mechanisms, which puts the Ada concepts into perspective.