2.1 任务
/* file: include/linux/sched.h */
struct task_struct {
/* 与优先级相关的字段 */
int prio;
int static_prio;
int normal_prio;
unsigned int rt_priority;
/* 调度策略 */
const struct sched_class *sched_class;
/* 调度实体,调度器的调度对象,该字段用于 CFS */
struct sched_entity se;
/* 该字段用于 RT 调度器 */
struct sched_rt_entity rt;
#ifdef CONFIG_CGROUP_SCHED
struct task_group *sched_task_group;
#endif
/* 该字段用于 DL 调度器 */
struct sched_dl_entity dl;
}Last updated