Contents   Index   Search   Previous   Next


D.2.2 The Standard Task Dispatching Policy

Syntax

1
The form of a pragma Task_Dispatching_Policy is as follows:
2
  pragma Task_Dispatching_Policy(policy_identifier );

Legality Rules

3
   The policy_identifier shall either be FIFO_Within_Priorities or an implementation-defined identifier.

Post-Compilation Rules

4
   A Task_Dispatching_Policy pragma is a configuration pragma.
5
   If the FIFO_Within_Priorities policy is specified for a partition, then the Ceiling_Locking policy (see D.3) shall also be specified for the partition.

Dynamic Semantics

6
   A task dispatching policy specifies the details of task dispatching that are not covered by the basic task dispatching model. These rules govern when tasks are inserted into and deleted from the ready queues, and whether a task is inserted at the head or the tail of the queue for its active priority. The task dispatching policy is specified by a Task_Dispatching_Policy configuration pragma. If no such pragma appears in any of the program units comprising a partition, the task dispatching policy for that partition is unspecified.
7
   The language defines only one task dispatching policy, FIFO_Within_Priorities; when this policy is in effect, modifications to the ready queues occur only as follows:
8
9
10
11
12
    Each of the events specified above is a task dispatching point (see D.2.1).
13
    In addition, when a task is preempted, it is added at the head of the ready queue for its active priority.

Documentation Requirements

14
    Priority inversion is the duration for which a task remains at the head of the highest priority ready queue while the processor executes a lower priority task. The implementation shall document:
15
16

Implementation Permissions

17
    Implementations are allowed to define other task dispatching policies, but need not support more than one such policy per partition.
18
    For optimization purposes, an implementation may alter the points at which task dispatching occurs, in an implementation defined manner. However, a delay_statement always corresponds to at least one task dispatching point.
NOTES
19
13  If the active priority of a running task is lowered due to loss of inherited priority (as it is on completion of a protected operation) and there is a ready task of the same active priority that is not running, the running task continues to run (provided that there is no higher priority task).
20
14  The setting of a task's base priority as a result of a call to Set_Priority does not always take effect immediately when Set_Priority is called. The effect of setting the task's base priority is deferred while the affected task performs a protected action.
21
15  Setting the base priority of a ready task causes the task to move to the end of the queue for its active priority, regardless of whether the active priority of the task actually changes.

Contents   Index   Search   Previous   Next   Legal