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: 1 Aug 93 03:25:49 GMT	[thread overview]
Message-ID: <1993Aug1.032549.18816@seas.gwu.edu> (raw)

In article <23corr$a8g@schonberg.cs.nyu.edu> dewar@cs.nyu.edu (Robert Dewar) wr
ites:
>Mike assumes that automatic recognition of passive tasks is a good thing.
>He is apparently unaware that this is by no means obvious, and indeed most
>of the Ada folks in realtime areas that I have talked to do not AT ALL like
>the idea of such automatic recognition, and much prefer explicit control
>over thread structure.
Well, obviously we are in disagreement here. Somewhere I got the idea that
the purpose of high-level languages was PRECISELY to buffer the programmer
from these little implementation details and learn to have faith in the
compiler. As compilers mature they get better and better at the various
optimizations, which (should) become more and more transparent to the
programmer, who simply ends up delighted at the performance but doesn't
know or care why.

Yes, there may be some realtime guys who object to losing ANY 
control. These are the same folks who use shared variables, and indeed
probanly use a lot of global data because parameter passing is, at least
in their minds, "inefficient". I can't dispute their perceived need to
do these things; I'll stipulate that they've gotta do what they've gotta do.

What about the rest of the world? Realtime ain't all there is. Tasking is
not just a realtime structure, it's also an ABSTRACTION mechanism. Somehow
in trying to keep the realtimers happy, the rest of us got lost in the dust.

Tasking need not be nearly as "inefficient" as it is sometimes claimed
to be. I assert that we (usually) could not care less about the
order of evaluation of expressions (and if we do care we use parentheses,
etc., to second-guess the compiler). There are lots of things we usually
leave to the optimizer to sort out for us. Do we need a pragma to get
a short loop unrolled? A constant calculation pulled out of a loop?
No, that's motherhood.

I claim that tasking is (rather, should have been) in a similar category.
It's an abstraction mechanism; we use it to express concurrent algorithms,
or rather to express algorithms in a concurrent manner. That's what we
were told in the early days of tasking; some of us actually still believe
it. It's the business of the compiler writer to get everything done for
us in the most optimal way. Over time, the compilers get better and
better, and we get happier and happier because the better and better
gets more and more transparent, requiring less micro-managing from us.

If certain kinds of tasks can be implemented more efficiently, without
my having to second-guess with pragmas, so much the better. I hope
that Robert hasn't been around the real-time Establishment so long that 
he's forgotten the _rest_ of what tasking is supposed to be about.
>
>Many of us felt in the Ada 9X process that the needs for efficient 
>tasking would better be met by formalizing and structuring the opportunities
>for this kind of task optimization, but it was quite clear that the realtime
>community much prefers the explicit approach as exemplified by the protected
>type feature of 9X.

I quite agree that the 9X process has listened to the realtimers. That
is not inappropriate, but I think it may have been carried to the extreme.
Protected types are basically taking us back to monitors. Maybe they
should have been there all along. But that's only half the story. I'm afraid
that being able to satisfy their R/T customers with protected types, the
vendor folks will let themselves off the hook from really trying to
optimize tasking for the rest of us. 

I don't deny that it's important to listen to the customer. But listening
ONLY to the (current) customer deprives the compiler folks of the great
thrill of getting out front and leading, instead of following the
(government) customer all the time. Robert, it's all part of the same
mentality.
>
>I also know that Alsys found in deciding how to proceed that people in 
>general much preferred the kind of explicit pragma approach that Verdix
>uses to the kind of automatic recognition that DDC does.

I'm people. Nobody asked me. They asked their realtime customers.  They
asked mostly the guys who want to control every bit and every microsecond,
and neglected those of us who think we are paying compiler writers
to get REALLY GOOD (over time) at optimizing stuff without bothering us
with details like pragmas. I'd be less prone to kvetch about the obscene
prices if I thought our money was buying that kind of technical leadership.
>
>So, sure it's nice to see different vendors doing different things and taking
>different approaches, but Mike's "finally! at last! someone doing something
>reasonable for tasking!" approach is plainly inappropriate.
>
What the heck, I won't split hairs with you. Good people can disagree,
and we are plainly in disagreement on this. 

Mike Feldman

             reply	other threads:[~1993-08-01  3:25 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-08-01  3:25 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 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-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