comp.lang.ada
 help / color / mirror / Atom feed
From: ddciiny!jls@uunet.uu.net  (Jonathan Schilling)
Subject: Re: Query about monitor (passive) task optimization
Date: 9 Aug 93 14:48:34 GMT	[thread overview]
Message-ID: <CBHyGz.Jup@ddciiny.UUCP> (raw)

In article <244ktf$61@schonberg.cs.nyu.edu> dewar@cs.nyu.edu (Robert Dewar) wri
tes:
>Jonothan Shilling asks why people do not want automatic task optimization.
>After all, he asks, it only makes programs run faster.
>
>Well the point is that in realtime programs, running faster is not typically
>a requirement. The requirement is that all tasks complete their assigned
>tasks on schedule. General optimizations that may or may not speed up some
>tasks, depending on what the compiler can figure out, are not much help to
>a programmer who must demonstrate that the program he writes will meet its
>deadlines.
 
I concede your point for the general case, where tasks map to some
tangible application function (an airplane's navigation, an engine's
operation, etc.).  But in the particular case of monitor (passive)
tasks, the tasks are somewhat artificial, in that they exist only
to sychronize access to some resource.  They don't really map to
any application function, and probably don't have any assigned
schedule.  It seems to me that you would always want such tasks
to run as fast as possible.

>Imagine a worst case. Suppose a compiler used some probabilistic algorithm
>to estimate how it should optimize tasks. This is not unreasonable. The
>compiler has incomplete information about the program being compiled, so
>game theory would suggest that an optimizal strategy would be a mixed
>stratecy involving probabilistic choices. Well such a compiler would be
>unusable in real-time contexts -- every time you compiled, you might find
>that different tasks were optimized and the program would change its
>execution characteristics and perhaps correctness.
>
>On the other hand, this compiler would, on average, execute Ada programs
>faster than a compiler which did not do such probabistic optimization.

I certainly agree that any compiler that did this should tie the 
optimization to a pragma PROBABILISTIC, and then to a pragma
ARE_YOU_SURE_YOU_REALLY_WANT_TO_DO_THIS.

Obviously, any optimizations that involve tradeoffs (whether time vs.
space, task vs. task, instruction scheduling vs. debugging clarity) 
should be under some kind of user control.  But most Ada optimizations, 
tasking or non-tasking, don't involve tradeoffs; they involve recognizing
simple instances of generally complex constructs.  It's those that I'm in 
favor of compilers doing automatically.

-- 
Jonathan Schilling
DDC-I, Inc.
uunet!ddciiny!jls

             reply	other threads:[~1993-08-09 14:48 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-08-09 14:48 Jonathan Schilling [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 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-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