Skip to contentSkip to conversation

Query about the realtime processes scheduling.

DISCUSSION nilesh 2 participants 3 messages Aug 18, 2011

lore
Share & tools
lore

nilesh

author
#0 lore raw

Hi,

I am not too familiar with Linux scheduler. What I could understand theoretically is - the interactive processes get advantage (-5) in priority. And hence the effective priority is higher.

Query:
Is this true for realtime processes ( with SCHED_FIFO/SCHED_RR policy) as well? Could the realtime processes be I/O bound or interactive?

Signature · 2 lines
Thanks,
Nilesh
author
#1 lore raw
Quoted 10 lines · nilesh

Hi,

I am not too familiar with Linux scheduler. What I could understand theoretically is - the interactive processes get advantage (-5) in priority. And hence the effective priority is higher.

Query:
Is this true for realtime processes ( with SCHED_FIFO/SCHED_RR policy) as well? Could the realtime processes be I/O bound or interactive?

Please ignore the post.
I should have looked into the code before posting the query. It looks like the bonus/penalty is only for non-realtime tasks.

2101static int effective_prio(struct task_struct *p) 2102{
2103 p->normal_prio = normal_prio(p);
2104 /*

2105         * If we are RT tasks or we were boosted to RT priority,
2106         * keep the priority unchanged. Otherwise, update priority
2107         * to the normal priority:
2108         */

2109 if (!rt_prio(p->prio))
2110 return p->normal_prio;
2111 return p->prio;
2112}
2113

Signature · 2 lines
Thanks,
Nilesh
#2 lore raw
Quoted 3 lines · nilesh

Please ignore the post.
I should have looked into the code before posting the query. It looks like the bonus/penalty is only for non-realtime tasks.

Correct. Most (if not all) realtime priority scheduling is done in FIFO style and their priority is static.

Signature · 7 lines
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com