- 论坛徽章:
- 1
|
2.6.24 版本的内核 kernel/sched.c (3.11也是):
/*
* This is the priority-queue data structure of the RT scheduling class:
*/
struct rt_prio_array {
DECLARE_BITMAP(bitmap, MAX_RT_PRIO+1); /* include 1 bit for delimiter */
struct list_head queue[MAX_RT_PRIO];
};
其中 MAX_RT_PRIO = 100;
《linux 内核编程》 P80 : (我没找到这本书是针对哪个内核版本的,是不是有些早了? 2011年出版的)
struct prio_array {
int nr_active;
unsigned long bitmap[BITMAP_SIZE]; /* include 1 bit for delimiter */
struct list_head queue[MAX_PRIO];
};
其中 MAX_PRIO = 140;
我的问题是:
是不是可以认为2.6.24及以后的内核版本中只针对实时进程的就绪进程才有优先级队列,共100项,
而普通进程的就绪队列中只要进程的静态优位于100-139之间,就不再有优先级队列,所有优先级别的就绪进程都在一个就绪队列中
毕竟内核代码里面已经找不到140个数组这样的定义了,包括3.11版本
|
|