Competition among realtime tasks is strictly based upon rt_priority and ordering in the run queue. The task on the run queue with the highest rt_priority is picked to run every time. If there is a rt_priority tie, then the first tying task on the run queue is picked. Scheduling policys of the various tasks factor in when there are multiple tasks with the same rt_priority. A SCHED_FIFO task that wins a rt_priority tie by virtue of being at the front of the run queue will stay at the front of the run queue and continue to win all the ties until it leaves the run queue. On the other hand a SCHED_RR that wins a rt_priority tie will move to the end of the run queue. This move ensures that all other SCHED_RR tasks on the run queue that have the same rt_priority as the current winner will run before the current winner gets to run again.