本文主要是介绍Linux Kernel调度管理之rt_rq,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
rt_rq是Linux内核为实时进程设计的就绪队列,当然它是为实时调度类准备的就绪队列:
/* Real-Time classes' related field in a runqueue: */ struct rt_rq { struct rt_prio_array active; unsigned int rt_nr_running; unsigned int rr_nr_running; #if defined CONFIG_SMP || defined CONFIG_RT_GROUP_SCHED struct { int curr; /* highest queued rt task prio */ #ifdef CONFIG_SMP int next; /* next highest */ #endif } highest_prio; #endif #ifdef CONFIG_SMP unsigned long rt_nr_migratory; unsigned long rt_nr_total; int overloaded; struct plist_head pushable_tasks; #ifdef HAVE_RT_PUSH_IPI int push_flags; int push_cpu; struct irq_work push_work; raw_spinlock_t push_lock; #endif #endif /* CONFIG_SMP */ int rt_queued; int rt_throttled; u64 rt_time; u64 rt_runtime; /* Nests inside the rq lock: */ raw_spinlock_t rt_runtime_lock; #ifdef CONFIG_RT_GROUP_SCHED unsigned long rt_nr_boosted; struct rq *rq; struct task_group *tg; #endif };
注意,对于实时进程的就绪队列来说,其是内嵌在就绪队列rq中的。
也就是说,进程知道其调度策略也就知道其所在的就绪队列了。
这篇关于Linux Kernel调度管理之rt_rq的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!