Newsgroups: comp.sys.transputer
From: teig@autro1.UUCP (Oyvind Teig)
Subject: Priority inversion
Organization: Autronica A/S, Trondheim, Norway
Date: 14 Sep 94 05:39:56 GMT
Message-ID: <180@autro1.UUCP>

Priority inversion

Priority inversion is when a high priority process must unwantedly wait
for a low priority process. Example: For a High Pri process to send
data to a Low Pri process we must introduce a High Pri process in
between, which must be able to swallow data fast enough.

What if a Low Pri process sends data on a variant Protocol to a
High Pri process. (I program in occam, so my example here is in occam.
This question may also be asked with C, if you send more than one
package of data in one batch)

fromLowPri.toHighPri ! sizeA::arrayA; sizeB::arrayB

When the High Pri process has received arrayA, the Low Pri process
must be scheduled to send arrayB (the ";" tells me).

Q1: Must the High Pri process now wait for all the Low Pri processes
    that is in front of this sender (in the scheduler's queues) before
    the Low Pri process can send arrayB?

Q2: In other words: If I use a variant Protocol between a High Pri and
    a Low Pri process, do I have to have a High Pri buffer in that
    direction as well?

My guess is that I have the priority inversion problem here also,
I do have to add buffering...

14.9.94 0yvind Teig. Autronica. 7005 Trondheim Norway

