[comp.lang.ada] tasking question

bs@augusta.UUCP (Burch Seymour) (05/11/88)

Hello,

I recently gave a presentation to a SigAda chapter meeting describing
one of our Ada products. During the discussion of tasking someone asked
how we handle the "priority inversion problem".  I explained that I
didn't know the term and could he be more specific. Well before he
got into it, someone else told him that it was "a problem with the
language, not an implementation so it should be fixed in the language".
Both of these folks left before I could talk to them further. Anyway,
can anyone out there enlighten me as to what they were discussing?
Our local Ada wizards have never heard of this. Or at least not by that
name.

Thanks.

-Burch Seymour-  ...uunet!gould!bseymour  or any of several dozen others...
---------------------------------------------------------------------------

dorourke@polyslo.UUCP (David M. O'Rourke) (05/11/88)

In article <1133@augusta.UUCP> bs@augusta.UUCP (Burch Seymour) writes:
>
>Hello,
>
>I recently gave a presentation to a SigAda chapter meeting describing
>one of our Ada products. During the discussion of tasking someone asked
>how we handle the "priority inversion problem".  I explained that I
 more stuff that you can read in the original posting.

  If anyone responds directly to this, and not on the net, could I be included
in the cc list.  I would love to know what this is!!


David M. O'Rourke

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| dorourke@polyslo | Disclaimer:  All opinions in this message are mine, but  |
|                  |              if you like them they can be yours too.     |
|                  |              Besides I'm just a student so what do I     |
|                  |              know!                                       |
|-----------------------------------------------------------------------------|
|    When you have to place a disclaimer in your mail you know it's a sign    |
| that there are TOO many Lawyer's.                                           |
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

stt@ada-uts (05/12/88)

Priority inversion is discussed in the session summary for Tasking
by Dennis Cornhill (credited to Lui Sha) in the special
issue of Ada Letters Volume VII, #6, Fall 1987 containing
the proceedings of the Internatiional Workshop on Real-Time
Ada Issues, Moretonhapstead, Devon, UK, 13-15 May 1987.

Priority inversion happens when a task is in rendezvous with
a low priority caller and a high priority task calls it.
Meanwhile, the task in rendezvous has been preempted by
a middle priority task.  The result is that a high priority
task is waiting while a middle priority task,
with which it has no synchronization, is proceeding.
A suggested solution was to define the priority of a task the
maximum of its own priority, that of its current caller,
and that of all of its pending callers (this represents a language
change).

A work-around is to make sure that an accepting task has
a specified priority at least as great of each of its potential callers,
though this may clearly create undesirable side-effects when the task
is not serving its highest-priority caller.
If the task is essentially a server or "monitor" task, with little
code outside of rendezvous, then setting it to a high priority
is probably prudent anyway so as to ensure that the shared resource
it manages is locked the minimal amount of time.

-Tucker Taft
Intermetrics, Inc.
Cambridge, MA  02138