D.4.1 Admission Policies
[This subclause specifies a mechanism for a user
to choose an admission policy. It also defines one such policy. Other
policies are implementation defined.]
Implementation-defined admission policies.
shall be either FIFO_Spinning or an implementation-defined identifier.
An Admission_Policy pragma is a configuration pragma.
An admission policy governs the order in which
competing tasks are evaluated for acquiring the execution resource associated
with a protected object. The admission policy is specified by an Admission_Policy
One admission policy, FIFO_Spinning, is language
defined. If FIFO_Spinning is in effect, and starting a protected action
on a protected object involves busy-waiting, then calls are selected
for acquiring the execution resource of the protected object in the order
in which the busy-wait was initiated; otherwise the FIFO_Spinning policy
has no effect. If no Admission_Policy pragma applies to any of the program
units in the partition, the admission policy for that partition is implementation
A possible implementation for this policy would be to apply the abstraction
of a ticketing system by assigning two sequence number values to each
protected object. One sequence number represents the next available ticket
number, and the other sequence number represents the ticket number currently
being serviced by the protected object. The next available ticket number
is incremented and assigned to a task when the task initiates a busy-wait
for acquiring the execution resource associated with the protected object.
The ticket number currently being serviced is incremented when a task
releases this execution resource. As part of acquiring the execution
resource, a task busy-waits until its assigned ticket number equals the
protected object's value for the ticket number currently being serviced.
While a task busy-waits, it monitors the active priority of the protected
object in order to inherit any modifications to the protected object's
Implementations are allowed to define other admission
policies, but need not support more than one admission policy per partition.
rule is in fact redundant, as 10.1.5 allows
an implementation to limit the use of configuration pragmas to an empty
environment. In that case, there would be no way to have multiple policies
in a partition.
Extensions to Ada 2012
Admission Policies and the
specific policy FIFO_Spinning are new.
Ada 2005 and 2012 Editions sponsored in part by Ada-Europe