comp.lang.ada
 help / color / mirror / Atom feed
From: seas.gwu.edu!mfeldman@uunet.uu.net  (Michael Feldman)
Subject: Re: Query about monitor (passive) task optimization
Date: 2 Aug 93 18:13:19 GMT	[thread overview]
Message-ID: <1993Aug2.181319.18960@seas.gwu.edu> (raw)

In article <1993Aug2.091924.19310@sei.cmu.edu> ae@sei.cmu.edu (Arthur Evans) wr
ites:
>
>That's not the reason that was cited by the real-time folks in Ada 9X
>design discussions.
>
>Consider a real time application with tight time constraints.  The
>programmer, who is familiar with the requirements of the vendor's
>compiler, codes the task with care so that the compiler will be able to
>perform clever optimizations.  The code meets its requirements.
>
>Later, in maintenance, another programmer makes a seemingly trivial
>modification to the source code.  An effect, unfortunately, is that the
>conditions for performing the optimization are no longer met.  The code
>is still semantically correct, but the application fails in ways
>difficult to diagnose because a timing constraint is sometimes missed.

I would assert that it is really not too hard to understand what a
passive task is. Turning a passive task into something else is NOT
a "seemingly trivial change", except maybe to a programmer who is
clueless about what concurrency's all about. (Maybe that is part of
the problem: clueless programmers?)
>
>The advantage of the pragma approach is that it precludes this
>possibility.  Use of the pragma says, in effect, "I want the compiler to
>perform this optimization, and I promise to avoid certain features that
>preclude its use."  If a change in maintenance causes the promise not to
>be kept, the complier can provide a clear diagnostic.

If 1815-A had required this pragma, I would have no objection. (Well,
I'd rather it be automatic, but a pragma is a decent mechanism for
optimization, used all over Ada for this sort of thing.) But under the
circumstances, it's implementation-dependent. So much for a common
language with reasonably portable program behavior.
>
>Should Ada cater to the hard real-time folks as above, or to the general
>community that Mike speaks for?  Well, yes, it should -- to both.  But
>keep in mind that Ada's initial sponsor had in mind embedded
>applications, and that such applications usually have hard real-time
>requirements.

All the more reason for passive tasks being identified as such in the
LRM, maybe by pragma. Fine. Or all the major vendors could agree on
a de facto standard pragma PASSIVE, with the same qualifiying conditions.
Fine. But what we've got now is a sort of feature war, which is not what
Ada was supposed to be about.

It is instructive to read the Rationale again on this subject, and maybe
the LRM. There tasking is discussed as a _language_ feature, an abstraction
mechanism. Two assumptions are implicit: (1) users would take the trouble
to understand the feature, and (2) compiler writers would (learn how to)
implement it with increasing efficiency and sophistication in each new
release. That's not what we got, is it?
>
>Now, having said all that, I can agree with Mike's comment.  Here it is
>10 years after standardization of Ada-83.  It may not be surprising that
>vendors first took the pragma approach; it's sad that after all this
>time so few have implemented the optimizations.  The right approach, I
>would say, is to implement the optimizations _and_ provide a pragma that
>makes the promise that the program will meet the requirements for the
>optimization.
>
Well, OK. I suppose we need a "pragma NO_SIDE_EFFECTS" for each arithmetic
expression we want the compiler to optimize. :-)

Seriously - my point is that Ada compiler houses have been IMHO market
trend-followers, instead of trend-setters. These guys are (were supposed to 
be) the Best and the Brightest: young, well-educated, enthusiastic, and
working with a rich language that really exercised their minds. From the
private mail I get from current and former techies in these companies,
I'm getting the picture that there are a lot of frustrated techies
out there, stifled by myopic management looking mainly at the next
contract or the next quarter instead of the next decade. It all comes
down to short-term return-on-investment, doesn't it?

Sigh...

Mike

             reply	other threads:[~1993-08-02 18:13 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-08-02 18:13 Michael Feldman [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-08-13  7:32 Query about monitor (passive) task optimization agate!howland.reston.ans.net!darwin.sura.net!sgiblab!munnari.oz.au!goanna
1993-08-11  2:34 agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!math.ohio-state.edu!u
1993-08-10 23:49 Michael Feldman
1993-08-10 23:14 Michael Feldman
1993-08-10 13:51 Robert Dewar
1993-08-10 13:44 Robert Dewar
1993-08-10  1:47 cis.ohio-state.edu!math.ohio-state.edu!darwin.sura.net!seas.gwu.edu!mfeld
1993-08-10  1:38 cis.ohio-state.edu!math.ohio-state.edu!darwin.sura.net!seas.gwu.edu!mfeld
1993-08-09 21:15 Robert I. Eachus
1993-08-09 14:48 Jonathan Schilling
1993-08-09 12:14 Robert Dewar
1993-08-09 11:02 Richard Kenner
1993-08-09  4:57 Robert Dewar
1993-08-09  4:47 Robert Dewar
1993-08-09  4:41 Robert Dewar
1993-08-03 20:10 Michael Feldman
1993-08-03 20:01 Michael Feldman
1993-08-03 15:26 Jonathan Schilling
1993-08-03 10:11 Bjorn Kallberg
1993-08-02 18:17 Michael Feldman
1993-08-02 17:47 Michael Feldman
1993-08-02 14:35 Jonathan Schilling
1993-08-02 13:19  Arthur Evans
1993-08-02  6:41 Bjorn Kallberg
1993-08-02  3:30 Michael Feldman
1993-08-02  1:57 Jonathan Schilling
1993-08-01  3:25 Michael Feldman
1993-07-31  3:27 Robert Dewar
1993-07-30 17:51 Michael Feldman
replies disabled

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