Subject: Re: [linux-audio-dev] priority inversion & inheritance
From: Kai Vehmanen (kai.vehmanen_AT_wakkanet.fi)
Date: Thu Jul 11 2002 - 18:34:51 EEST
Forgot one thing... :)
On Thu, 11 Jul 2002, Martijn Sipkema wrote:
>> The two threads must run with SCHED_FIFO as they both need to complete
>> their cycle before the next soundcard interrupt.
> And even if they both run SCHED_FIFO, they should then also run at the same
> priority.
Not needed. The SCHED_FIFO protects against from other tasks taking the
CPU. If we have two SCHED_FIFO threads communicating with a mutex
protected queue, different priorities are not a problem as for priority
inversion to happen, one of them needs to block on the shared mutex. And
if the thread is blocked, it then isn't in the run queue, and thus cannot
get the CPU.
-- http://www.eca.cx Audio software for Linux!
This archive was generated by hypermail 2b28 : Thu Jul 11 2002 - 18:57:12 EEST