Re: [linux-audio-dev] priority inversion & inheritance

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] priority inversion & inheritance
From: Martijn Sipkema (msipkema_AT_sipkema-digital.com)
Date: Fri Jul 12 2002 - 00:26:44 EEST


> >> 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.

Not true as far as I know. FIFO only means that the thread won\'t be preempted
after a certain time in case a thread of the same priority is ready to run.
AFAIK all threads running either SCHED_FIFO or SCHED_RR will always be
preempted by higher priority SCHED_* threads. Please correct me if I am wrong
in this.

--martijn

Powered by ASHosting


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Jul 12 2002 - 00:13:00 EEST