摘要: 在调度过程中,拥有相异地址空间的换入换出线程切换代价过大,以及将线程作为时间片分配的唯一主体会导致进程层面上的不公平。针对上述问题,提出一种快速上下文切换调度算法。通过创新组织就绪队列中的调度体,使属于同一进程的线程尽量靠拢,以便优先选择,同时在分配时间片时考虑进程的线程总量。实验结果证明,该算法能减少系统的切换代价,并控制进程获取的时间片总量,提高系统的执行效率和公平性。
关键词:
NTOS系统,
微内核,
调度算法,
就绪队列,
上下文切换,
时间片
Abstract: There are two problems in normal schedulers, one is that threads with different contexts cost a lot while scheduling, another is that it is unfair to allocate time slice without considering thread-number of process. This paper proposes a Fast Context Switching Scheduler(FCSS) algorithm. It takes threads belonging to the same process as close as possible in the ready queue, and the total amount of threads into consideration when allocating time slice. Experimental results show that the algorithm reduces the cost of switching of the system, controls the total amount of time slice, and improves the efficiency and fairness of the system.
Key words:
NTOS,
micro-kernel,
schedule algorithm,
ready queue,
context switching,
time slice
中图分类号:
刘超明, 钱振江, 黄皓. 快速上下文切换调度算法[J]. 计算机工程, 2013, 39(5): 84-87.
LIU Chao-Meng, JIAN Zhen-Jiang, HUANG Hao. Fast Context Switching Schedule Algorithm[J]. Computer Engineering, 2013, 39(5): 84-87.