Re: [LAD] Kontakt Spikes

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <robin@...>, <most@...>
Cc: <linux-audio-dev@...>, <clemens@...>
Date: Monday, October 10, 2011 - 8:37 pm

--_e4d70678-01e3-4b62-af8c-c1e6ef54221d_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

> >> Would (a) a SCHED_RR/50 thread be run ahead of a SCHED_FIFO/49 thread?

We have three answers=2C yes=2C no=2C and maybe. According to the kernel sc=
heduler the=20
answer is yes. The kernel does not actually have the final say here though =
which is=20
why the answers no and maybe can be equally valid. Depending on the code in=
volved=20
the SCHED_RR/50 thread might be using semaphores which can cause priority=20
inversion depending on who owns the semaphore.

The RR/50 can request a semaphore being held my a FIFO/48 and it will pend.=
The
FIFO/49 can now pre-empt the FIFO/48 and hence also pre-empt the RR/50. Thi=
s
may not be what was anticipated. It is bad programming but unusually easy t=
o do=2C
especially with regards to audio thread=2C midi threads=2C GUI threads and =
all the
other gory details of audio app programming.

I only bring it up since I read the original post to concern pre-emption of=
high pri
threads and there are ways this can happen depending on what you are doing.

Other people on the list can probably give you better explanation of the is=
sue and=20
perhaps even explain whether it is even relevant?

Regards=2C nick.
=

--_e4d70678-01e3-4b62-af8c-c1e6ef54221d_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

&gt=3B &gt=3B&gt=3B Would (a) a SCHED_RR/50 thread be run ahead of a SCHED_=
FIFO/49 thread?We have three answers=2C yes=2C no=2C and maybe=
. According to the kernel scheduler the answer is yes. The kernel does =
not actually have the final say here though which is why the answers no=
and maybe can be equally valid. Depending on the code involved the SCH=
ED_RR/50 thread might be using semaphores which can cause priority inve=
rsion depending on who owns the semaphore.The RR/50 can request a s=
emaphore being held my a FIFO/48 and it will pend. TheFIFO/49 can now p=
re-empt the FIFO/48 and hence also pre-empt the RR/50. Thismay not be w=
hat was anticipated. It is bad programming but unusually easy to do=2Ce=
specially with regards to audio thread=2C midi threads=2C GUI threads and a=
ll theother gory details of audio app programming.I only bring =
it up since I read the original post to concern pre-emption of high pri=
threads and there are ways this can happen depending on what you are doing.=
Other people on the list can probably give you better explanation o=
f the issue and perhaps even explain whether it is even relevant?Regards=2C nick.
=

--_e4d70678-01e3-4b62-af8c-c1e6ef54221d_--

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAD] Kontakt Spikes, Michael Ost, (Sat Oct 8, 1:26 am)
Re: [LAD] Kontakt Spikes, Clemens Ladisch, (Sat Oct 8, 11:03 am)
Re: [LAD] Kontakt Spikes, Michael Ost, (Mon Oct 10, 5:56 pm)
Re: [LAD] Kontakt Spikes, Clemens Ladisch, (Mon Oct 10, 10:05 pm)
Re: [LAD] Kontakt Spikes, Michael Ost, (Tue Oct 11, 12:42 am)
Re: [LAD] Kontakt Spikes, Clemens Ladisch, (Tue Oct 11, 8:24 am)
Re: [LAD] Kontakt Spikes, Clemens Ladisch, (Tue Oct 11, 8:52 am)
Re: [LAD] Kontakt Spikes, Michael Ost, (Tue Oct 11, 4:33 pm)
Re: [LAD] Kontakt Spikes, Paul Davis, (Tue Oct 11, 10:10 pm)
Re: [LAD] Kontakt Spikes, Michael Ost, (Tue Oct 25, 12:28 am)
Re: [LAD] Kontakt Spikes, Paul Davis, (Tue Oct 25, 12:36 am)
Re: [LAD] Kontakt Spikes, Michael Ost, (Tue Oct 11, 10:25 pm)
Re: [LAD] Kontakt Spikes, Robin Gareus, (Mon Oct 10, 7:05 pm)
Re: [LAD] Kontakt Spikes, Robin Gareus, (Mon Oct 10, 7:09 pm)
Re: [LAD] Kontakt Spikes, Nick Copeland, (Mon Oct 10, 8:37 pm)
Re: [LAD] Kontakt Spikes, Michael Ost, (Mon Oct 10, 8:48 pm)
Re: [LAD] Kontakt Spikes, Fons Adriaensen, (Mon Oct 10, 7:31 pm)
Re: [LAD] Kontakt Spikes, Robin Gareus, (Mon Oct 10, 7:37 pm)
Re: [LAD] Kontakt Spikes, Robin Gareus, (Sat Oct 8, 3:08 am)
Re: [LAD] Kontakt Spikes, Michael Ost, (Wed Oct 12, 11:28 pm)
Re: [LAD] Kontakt Spikes, Robin Gareus, (Thu Oct 13, 2:20 am)
Re: [LAD] Kontakt Spikes, Michael Ost, (Mon Oct 10, 6:03 pm)
Re: [LAD] Kontakt Spikes, Devin Anderson, (Sat Oct 8, 2:46 am)
Re: [LAD] Kontakt Spikes, Michael Ost, (Mon Oct 10, 7:38 pm)
Re: [LAD] Kontakt Spikes, Devin Anderson, (Mon Oct 10, 8:14 pm)