[comp.lang.ada] M. Feldman's questions on prioritie

stt@ada-uts (02/18/88)

Preemption is not required to implement the delay, even
when multiple priorities are supported, because...
"The execution of a delay statement ... suspends further execution of the
task ... for *at least* the duration specified..." (LRM 9.6:1).

The "at least" part allows the delay statement to result in a delay
until the next "natural" scheduling point following its
expiration.  I certainly agree that this defeats the usual
purpose for delay, and the LRM should have made statements
indicating that the implementation must preempt at the first
possible time after expiration, but alas, it didn't, and so
implementations need not support preemption.

Note however that multi-processor implementations
must support preemption for another reason -- namely that
a high priority task on one processor may start a middle priority
task, and if some other processor is at that time running
a lower priority task, it must be preempted (presuming
that the new task can "sensibly be executed using the same physical
processor" (LRM 9.8:4).  Of course "sensibly" is not well defined,
and so this preemption requirement might also be avoided by appropriate
definition gymnastics.

Tucker Taft
c/o Intermetrics, Inc.
Cambridge, MA  02138