作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2013, Vol. 39 ›› Issue (5): 84-87. doi: 10.3969/j.issn.1000-3428.2013.05.017

• 体系结构与软件技术 • 上一篇    下一篇

快速上下文切换调度算法

刘超明,钱振江,黄 皓   

  1. (南京大学计算机科学与技术系软件新技术国家重点实验室,南京 210093)
  • 收稿日期:2012-05-09 出版日期:2013-05-15 发布日期:2013-05-14
  • 作者简介:刘超明(1986-),男,硕士研究生,主研方向:安全操作系统;钱振江,讲师、博士研究生、CCF会员;黄 皓,教授、博士生导师
  • 基金资助:
    国家“863”计划基金资助重大项目“以支撑电子商务为主的网络操作系统研制”(2011AA01A202);江苏省“六大人才高峰”高层次人才基金资助项目(2011-DZXX-035)

Fast Context Switching Schedule Algorithm

LIU Chao-ming, QIAN Zhen-jiang, HUANG Hao   

  1. (National Key Laboratory for Novel Software Technology, Department of Computer Science and Technology, Nanjing University, Nanjing 210093, China)
  • Received:2012-05-09 Online:2013-05-15 Published:2013-05-14

摘要: 在调度过程中,拥有相异地址空间的换入换出线程切换代价过大,以及将线程作为时间片分配的唯一主体会导致进程层面上的不公平。针对上述问题,提出一种快速上下文切换调度算法。通过创新组织就绪队列中的调度体,使属于同一进程的线程尽量靠拢,以便优先选择,同时在分配时间片时考虑进程的线程总量。实验结果证明,该算法能减少系统的切换代价,并控制进程获取的时间片总量,提高系统的执行效率和公平性。

关键词: 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

中图分类号: