comp.lang.ada
 help / color / mirror / Atom feed
From: "Norman H. Cohen" <ncohen@watson.ibm.com>
Subject: Re: ADA task
Date: 1996/09/19
Date: 1996-09-19T00:00:00+00:00	[thread overview]
Message-ID: <324159A2.6220@watson.ibm.com> (raw)
In-Reply-To: 96091716303787@psavax.pwfl.com


Marin David Condic, 407.796.8997, M/S 731-93 wrote:

>     Out of curiosity & ignorance, is there anything in the LRM which
>     guarantees some minimal latency or predictability with the "delay
>     until" statement? 

The Ada-95 Real-Time Annex defines certain "metrics" of real-time
performance, including metrics of the performance of both kinds of delay
statement.  (See RM Section D.9.)  The Annex requires implementations
claiming conformance to the Annex to document their performance with
respect to these metrics as well as with respect to several
nonquantitative aspects of real-time performance.

>                       I recall one of the big criticisms of Ada83 was
>     that the "delay" statement (and other language semantics) made it
>     very difficult, if not impossible, to write a task which could
>     schedule itself in a predictable manner. (That is, if one wanted
>     to fire off a task every 20 milliseconds, one would like to know
>     that any fraction of scheduling error is detected and corrected in
>     the next pass to the limit of the accuracy of the clock and that,
>     if at all possible, you get no "jitter" in the interval between
>     cycles.)

You are confusing jitter and cumulative drift.  Programming

   Next_Execution_Time := Next_Execution_Time + Iteration_Interval;
   delay Next_Execution_Time - Clock;

rather than

   delay Iteration_Interval;

corrects the "scheduling error" on one iteration by making the scheduled
delay on the next iteration correspondingly shorter.  However, this
eliminates cumulative drift, not jitter.  Elimination of jitter does
indeed depend on a ready task whose delay has expired being dispatched
promptly upon expiration of the delay.  It is up to the programmer to
ensure that all resources will be available by then and no equal or
higher priority tasks are still eligible to execute.  It is up to the
runtime system to ensure that the dispatching is efficient.  Many
successful real-time projects were written in Ada 83, by teams that
worked closely with the compiler vendor to ensure that the runtime
system met their performance requirements.

-- 
Norman H. Cohen    
mailto:ncohen@watson.ibm.com
http://www.research.ibm.com/people/n/ncohen




  reply	other threads:[~1996-09-19  0:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-17  0:00 ADA task Marin David Condic, 407.796.8997, M/S 731-93
1996-09-19  0:00 ` Norman H. Cohen [this message]
1996-09-20  0:00   ` Robert A Duff
  -- strict thread matches above, loose matches on Subject: below --
1996-09-18  0:00 tmoran
1996-09-17  0:00 Marin David Condic, 407.796.8997, M/S 731-93
1996-09-20  0:00 ` Robert A Duff
1996-09-11  0:00 Roumen Roupski
1996-09-12  0:00 ` Philip Brashear
1996-09-13  0:00 ` Norman H. Cohen
1996-09-13  0:00   ` Samuel T. Harris
1996-09-14  0:00     ` Robert Dewar
1996-09-14  0:00       ` Samuel T. Harris
1996-09-15  0:00         ` David C. Hoos, Sr.
1996-09-16  0:00           ` Samuel T. Harris
1996-09-16  0:00     ` Norman H. Cohen
1996-09-14  0:00   ` Roumen Roupski
1996-09-16  0:00     ` Norman H. Cohen
1996-09-14  0:00   ` Ken Garlington
1996-09-16  0:00   ` Robert I. Eachus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox