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: 3 Aug 93 20:01:23 GMT	[thread overview]
Message-ID: <1993Aug3.200123.111@seas.gwu.edu> (raw)

In article <1993Aug3.101131.15013@celsiustech.se> bjkae@celsiustech.se (Bjorn K
allberg) writes:
>In article <1993Aug2.174739.16569@seas.gwu.edu> mfeldman@seas.gwu.edu (Michael
 Feldman) writes:
>
>>How does this differ from _any_ optimization? Do you want compiler-dependent
>>pragmas for every teeny little optimization? I doubt it.
>
>It is a matter of scale. Changing from a passive task to a full task
>implementation may presumably increase the time a factor of ten, and may be 
>a factor of 100, if it is a simple case with no guards etc. 
>A full rendez-vous is one of the more expensive constructs in the language.
>
Yes, it is. That is EXACTLY why the compiler writers should be exerting
more effort to detect special cases and use heuristics to cut it down.
Instead, what they are doing is asking US to specify, in compiler-
dependent detail, the special cases for them. That is a cop-out.

>On the other hand, I would be very glad to have advice from the compiler.
>"This is a passive task, if you allow me I will optimize it for you".
>
I have no problem with such an advisory. 

Indeed, another advisory would be even better: "this appears to be a hybrid 
task that is difficult to optimize. Consider doing blah-blah restructuring
to make it more efficient; if you do, it'll run 10 times faster." 

I know, in general this is an expert-system problem. So? There's LOT of human 
domain expertise to draw on. Are the vendors building this kind of smarts into 
the front-ends of their systems? If they did, it would propagate to all
their zillion validations, because these big families have common
front-ends. One would think they'd see money in that.

(They could even fund some university projects to dope out all the
issues and suggest the heuristics and rules. Students are cheap.
A programmer, loaded up with overhead, costs $100k a year or more.
Students are a whole lot cheaper. Somehow the Ada companies forgot
that. Remember the days when TeleSoft employed UCSD students?)
>
>>>By the way, are not the automatic type conversions made by some programming
>>>languages, like PL1, quite wonderful? You don't have to write a lot of
>>>silly and unneccesary stuff. 
>>
>>Different issue. These implicit conversions, which caused everyone so much
>>heartache, were part of the language design, not an implementer choice.
>>The passive-task thing is an IMPLEMENTATION-DEPENDENT PRAGMA. Or, in the
>>case of DDC-I, they just do it.
>
>Now you are talking about standardisation, i.e. similarities between '
>different compilers. From a person using just one compiler, it is similar
>enought. To trust the compiler without explicit advice, or not to trust
>the compiler. 

It's still a different issue. If anything, it was much better defined
in PL/I. The compiler always knew what it was doing, and what it was doing
conformed (assuming the compiler was not buggy) to well-defined rules in
the PL/I "LRM". (I know, I taught that junk for years!) In Ada's case,
the LRM leaves a lot PURPOSELY unspecified, hoping that programmers will
get used to the idea of an abstract structure. In fact, in the early days
of Ada compilers the vendors WOULD NOT EVEN TELL YOU IF YOU ASKED. I
remember once, some years ago, asking the lead techie at an Ada vendor
to give me a list of the context-switch points in their tasking runtime.
His answer? "That's proprietary information." That's the truth! Sheesh.
>
>>
>>My objection was to some Ada users feeling that they need to control every
>>bit and microsecond of tasking. Why don't they insist on pragmas to
>>control every expression evaluation? I suspect it's because programmers
>>understand expressions and do not understand concurrency. And when they
>>
>One of the difficulties we have found using Ada for large project is, that
>it is so easy to write code, where the source code is very compact and
>"elegant", but the generated executable is painstakingly large and in-
>efficient. This can naturally be overcome, but it needs an explicit
>effort.

That is precisely what I meant. Either there was something subtle you
weren't understanding, or the compiler was not doing what you paid it to do.
I mean no offense, but I said a day or so ago that a lot of this is
due to dumb programmers or dumb compilers or both. As a teacher, I
can help to smarten up the people. I can't help to smarten up the compilers,
though, unless the vendors really want to. And I doubt that they do.
>
>
>>
>>What Ada was supposed to be about was a common language for which the
>>validation process guaranteed most behavior. This was supposed to lead
>>to a very active and innovative compiler industry that would find lots
>>of neat ways of exploiting the language features, and lots of users
>>who would learn the features and trust their compilers.
>>
>>So did it happen that way?
>>
>No, and as the compilers are less than optimal, it is still more important
>to know what actually happens. 

Naturally. I always find myself working at two levels. The first could be
described as "here's how it ought to be"; the second could be described
as "you gotta do what you gotta do". With a _given_ compiler on a _given_
project, you often end up with the second. So do my teaching and
consulting clients. That should not prevent us from pestering the
vendors to do a better job in earning that $25k per seat.

Cheers -

Mike Feldman

             reply	other threads:[~1993-08-03 20:01 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-08-03 20:01 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 15:26 Jonathan Schilling
1993-08-03 10:11 Bjorn Kallberg
1993-08-02 18:17 Michael Feldman
1993-08-02 18:13 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