<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
> >> Would (a) a SCHED_RR/50 thread be run ahead of a SCHED_FIFO/49 thread?<br><div><br>We have three answers, yes, no, and maybe. According to the kernel scheduler the <br>answer is yes. The kernel does not actually have the final say here though which is <br>why the answers no and maybe can be equally valid. Depending on the code involved <br>the SCHED_RR/50 thread might be using semaphores which can cause priority <br>inversion depending on who owns the semaphore.<br><br>The RR/50 can request a semaphore being held my a FIFO/48 and it will pend. The<br>FIFO/49 can now pre-empt the FIFO/48 and hence also pre-empt the RR/50. This<br>may not be what was anticipated. It is bad programming but unusually easy to do,<br>especially with regards to audio thread, midi threads, GUI threads and all the<br>other gory details of audio app programming.<br><br>I only bring it up since I read the original post to concern pre-emption of high pri<br>threads and there are ways this can happen depending on what you are doing.<br><br>Other people on the list can probably give you better explanation of the issue and <br>perhaps even explain whether it is even relevant?<br><br>Regards, nick.<br></div>                                        </div></body>
</html>