comp.lang.ada
 help / color / mirror / Atom feed
From: brosgol@AJPO.SEI.CMU.EDU (Ben Brosgol)
Subject: Priority Inversion
Date: 12 May 88 14:12:04 GMT	[thread overview]
Message-ID: <8805121412.AA23110@ajpo.sei.cmu.edu> (raw)

The phenomenon of priority inversion can be illustrated by the following
example.  On a uniprocessor system, there is a high priority task H, a
medium priority task M, and a low priority server task L.  At some point
in program execution, imagine that H is running, M is suspended, and
L is suspended at a place other than an accept for its service entry.
Now H issues a call on this service entry from L.  If L were ready to
accept this entry, it would assume H's high priority and execute the accept.
But L is not ready; thus H is suspended and M is run instead, thereby
blocking the high-priority task from receiving its service.

This problem was presented last year by Lui Sha (Carnegie-Mellon Univ) at
the International Workshop on Real-Time Ada Issues, at Moretonhampstead.
A summary of the issue was published in SIGAda's Ada Letters, Volume VII,
Number 7 (Nov-Dec '87), pages 30-32: "Priority Inversion in Ada" by
Dennis Cornhill and Lui Sha.
Full proceedings of the Moretonhamstead workshop were published as a
special issue of Ada Letters, Volume VII, Number 6 and were mailed
to SIGAda members.
An extended summary of the workshop, including an example of the
priorrity inversion problem, was published in Ada Letters, Volume VIII,
Number 1 (Jan-Feb '88), pages 91-107: "International Workshop on Real-Time
Ada Issues: Summary Report" by Ben Brosgol.

If you happen to have missed these issues because you're not a member
of SIGAda, that situation is easily remedied; send me a message that
includes your mailing address, and I'll send you an application form.

By the way, one solution that was proposed for the priority inversion
problem was to have priority inherited at the time the entry is called,
rather than waiting till the rendezvous starts.  Of course if the
called server task is itself suspended on a call of an entry for another
low priority task, then the inheritance of the high priority would have
to be passed on in a transitive fashion.

Note that if an implementor wants to support such a priority inheritance
approach but would rather not tinker with the language-defined semantics
of Ada priority (such changes tend to be frowned upon) it is legitimate
to supply an implementation-defined dynamic priorities package that has
the desired effect.  Just let all tasks have the same Ada priority;
thus the language rules will not interfere with inheritance of the
implementation-provided priority on entry calls.

-Ben Brosgol, Alsys Inc. / SIGAda Chair

             reply	other threads:[~1988-05-12 14:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1988-05-12 14:12 Ben Brosgol [this message]
  -- strict thread matches above, loose matches on Subject: below --
1988-05-13 21:31 Priority Inversion Robert Firth
replies disabled

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