[comp.lang.ada] INFO-ADA Digest V88 #43 Robert Dewar's response

flynn@ACF2.NYU.EDU (Susan Flynn) (02/20/88)

From: dewar@acf2.nyu.edu (Robert Dewar)
Date: 17-Feb-88 23:13 EST
Subject: Re: INFO-ADA Digest V88 #43

  a compiler which does not implement preemption of a lower priority task by
  a higher priority task whose delay expires is probably non-conforming,
  unless an argument can reasonably (i.e. according to the guidelines of
  AI-325) be made that such preemption is impossible (e.g. perhaps on a 
  machine with no timer interrupts such an argument could be made).

  It is wrong to refer to a compiler as "illegal". The various possible
  statuses of a compiler are:

    Conforming/non-conforming    does it conform to ANSI MIl STD 1615A as
				 modified by approved AI's?

    Validated/not validated      does it pass the ACVC tests or not?

    It is almost certainly the case that no compiler is conforming in the
    binary sense here, so it is better to talk of whether a compiler conforms
    in a particular respect.

    Of course compilers which do not properly implement preemption can still
    be validated because there is not (as of yet) a test which tests whether
    preemption is provided.

Note: if a compiler does not provide preemption, it should not allow multiple
priority levels. This seems well within allowed implementation variance. It
can still provide a pragma:

   pragma JUST_LIKE_ADA_PRIORITY_BUT_NO_PREEMPTION ...

and then do what it did before, because of course if there are no priorities
in the Ada sense, then following the implications of this implementation
defined pragma is one of the [many] possible correct scheduling sequences.

Surprisingly (to me) many people have been confused on this issue. I think a
lot of the surprise comes from the external (to the RM) feeling that it is
unreasonable to require preemptive scheduling. However, it seems to me that
the RM is crystal clear. If a task's delay has expired, it is ready to run!


D
D
D

D