comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert I. Eachus" <eachus@mitre.org>
Subject: Re: Ada Protected Object Turorial #2: Overview of Tasks
Date: 1999/12/21
Date: 1999-12-21T23:16:18+00:00	[thread overview]
Message-ID: <38600BE3.25B9F4BF@mitre.org> (raw)
In-Reply-To: 83j1g0$ck4$1@nnrp1.deja.com

Robert Dewar wrote:

> All in all, a good rule in Ada 95 is not to use ATC. I know
> that I generally say that any rule saying "don't use feature
> X" is a mistake since the feature would not be in the language
> unless it had been carefully thought out and understood to
> be useful. However, in my opinion [not new, I strongly opposed
> adding this feature] ATC is NOT a desirable feature in Ada :-)

   ATC is IMHO only useful in one very specific situation, but in that
case it is critical.  If you are building a fault tolerant system, you
need to be able to recover from the failure of some other component of
the system.  An example important to Ada's original intended use is in
round-robin schedulers for real-time systems.  In Ada 83 it is possible,
but very kludgy, to write a real-time cyclic executive.  But worse, if
the executive has to abort a task that  is overruning its time slot, it
must use an unlimited abort, which can cause nasal demons and other
effects unacceptable in safety-critical systems.  With ATC, it is
possible to migrate the time budget downward into the application, and
any operation that may exceed its budget can be wrapped in an ATC which
carefully limits the possible chaos.  In general, the abortable region
will be written as a procedure that cannot or will not access global
data.  After an ATC, the values of the out or in out parameters to the
call can and must be ignored.  Consider a radar system where there is an
algorithm whose execution time depends on the received data.  With ATC,
it is possible to discard data from one pulse and go on to the next. 
(This is necessary because the "bad guys" out there may be using all
sorts of electronic countermeasures and jamming.  If you can just
determine the jammed azimuth, it is possible to use triangulation to
find the source...

-- 

                                        Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...




  parent reply	other threads:[~1999-12-21  0:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-18  0:00 Ada Protected Object Turorial #2: Overview of Tasks James S. Rogers
1999-12-19  0:00 ` Robert Dewar
1999-12-20  0:00   ` Tucker Taft
1999-12-21  0:00     ` Robert Dewar
1999-12-21  0:00   ` Robert I. Eachus [this message]
1999-12-22  0:00   ` Robert A Duff
1999-12-23  0:00     ` Robert Dewar
1999-12-23  0:00       ` Robert A Duff
1999-12-23  0:00         ` Robert Dewar
1999-12-27  0:00           ` Robert A Duff
replies disabled

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