- 2
- 0
- 约3.77千字
- 约 4页
- 2016-07-05 发布于重庆
- 举报
内核2.6.28调度相关的数据结构分析
struct task_struct {
//进程的当前运行状态
?volatile long state;?/* -1 unrunnable, 0 runnable, 0 stopped */??unsigned int flags;?/* per process flags, defined below *///动态优先级,静态优先级和常规优先级
?int prio, static_prio, normal_prio;
//实时优先级?unsigned int rt_priority;?const struct sched_class *sched_class;/*调度类指针,一堆指向函数的指针*/
//CFS?调度实体?struct sched_entity se;
//实时调度实体?struct sched_rt_entity rt;
?unsigned int policy;/*进程的调度类型*/
struct list_head tasks;/*进程组织链表*/
/*上下文切换次数*/?unsigned long nvcsw, nivcsw; /* context switch counts */
}
2 sched_class,进程调度类:
?包括fair_sched_class,rt_sched_class和idle_sched_class,它们调用的
原创力文档

文档评论(0)