comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@gnat.com
Subject: Re: Looking for implementation idea
Date: 1999/02/08
Date: 1999-02-08T00:00:00+00:00	[thread overview]
Message-ID: <79ldf2$sc3$1@nnrp1.dejanews.com> (raw)
In-Reply-To: 1999Feb7.152252.1@eisner

In article <1999Feb7.152252.1@eisner>,
  Kilgallen@eisner.decus.org.nospam wrote:

> Perhaps there is something in the specification of
> compiler tests that allows one to pass with the caveat
> that "it only works on uniprocessors", but if a compiler
> vendor used that approach I would think they lose some of
> the more desirable customers (those with enough money to
> buy multiprocessors).

Of course it would be permissible to write an Ada compiler
that only worked on uniprocessors, but as Larry says, this
is unlikely, since it would not make commercial sense on
a machine for which MP configurations were available, and
certainly all current Ada 95 technologies support MP where
appropriate.

However, it should be noted that at the *programmer* level
it is quite possible to write programs that will work only
on a single processor (indeed some of the ACVCs are in this
category, and are marked as being inapplicable on
multi-processors).

If a program assumes that an active high priority task
which does not block will guarantee that low priority tasks
make no progress at all (a guarantee that MUST be true on
a mono-processor for a compiler that fully implements the
real time annex (*)) then you have a program which will
work only on a single processor.

Whether this is a bug or not depends on whether you want
your code to be portable to multi-processors. It should be
understood that it is not necessarily terrible to make this
assuption if you know you are in an SP environment, since
there are paradigms that operate much more efficiently if
this approach is taken. Still it is a risky trap.

(*) Of course not all compilers fully implement the real
time annex, including the important FIFO_Within_Priorities
dispatching policy that makes this guarantee. For example,
GNATWorks (GNAT with VxWorks) does fully implement this
capability, but some other Ada/95 VxWorks products do not.
As usual, you have to be careful that the compiler you get
has the capabilities you need!

Robert Dewar
Ada Core Technologies

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




  reply	other threads:[~1999-02-08  0:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-07  0:00 Looking for implementation idea Thomas Handler
1999-02-07  0:00 ` Niklas Holsti
1999-02-08  0:00   ` Thomas Handler
1999-02-09  0:00     ` Niklas Holsti
1999-02-10  0:00       ` Thomas Handler
1999-02-07  0:00 ` Corey Minyard
1999-02-07  0:00   ` Tom Moran
1999-02-07  0:00     ` Corey Minyard
1999-02-07  0:00   ` Larry Kilgallen
1999-02-08  0:00     ` dewar [this message]
1999-02-08  0:00       ` dennison
1999-02-08  0:00         ` robert_dewar
1999-02-07  0:00   ` Tucker Taft
1999-02-07  0:00     ` Corey Minyard
1999-02-08  0:00       ` robert_dewar
1999-02-08  0:00       ` Tucker Taft
1999-02-07  0:00         ` Corey Minyard
1999-02-08  0:00     ` dennison
1999-02-08  0:00       ` robert_dewar
1999-02-08  0:00       ` Tucker Taft
1999-02-09  0:00         ` robert_dewar
1999-02-11  0:00           ` Ehud Lamm
1999-02-08  0:00   ` Thomas Handler
1999-02-07  0:00 ` Paul Duquennoy
1999-02-08  0:00   ` Thomas Handler
replies disabled

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