Overview of Ada 2022
6.6 Admission policy for protected objects
On multiprocessor systems, a spin lock is typically
used to gain access to a protected object in order to execute a protected
action. Most multiprocessor locking algorithms prescribe that if there
is more than one request competing for the same resource, the requests
are served in FIFO order. This bounds the time it takes for a lower priority
task to gain access to a protected object. With Ravenscar all tasks are
statically allocated to processors, and if each protected object used
by tasks on different processors is given a high ceiling priority then
the blocking time for each task can be computed.
Previously the language did not presume any ordering
or queuing for tasks competing to start a protected action,
Admission
policy defined for acquiring a protected object resource (AI12-0276)
adds:
pragma Admission_Policy (FIFO_Spinning);
to specify that
FIFO_Spinning
is used (see RM
D.4.1).
A task will inherit the ceiling
priority of the protected object. Other, implementation-defined, Admission_Policies
may also be specified.
© 2021, 2022 Jeff Cousins