张洋, 张逸中. 一种任意时间片长度对CPU上下文切换代价影响消除的新方法[J]. 微电子学与计算机, 2015, 32(2): 92-96.
引用本文: 张洋, 张逸中. 一种任意时间片长度对CPU上下文切换代价影响消除的新方法[J]. 微电子学与计算机, 2015, 32(2): 92-96.
ZHANG Yang, ZHANG Yi-zhong. A New Method to Eliminate the CPU Context Switching Cost by the Effects of any Length of Time Slice[J]. Microelectronics & Computer, 2015, 32(2): 92-96.
Citation: ZHANG Yang, ZHANG Yi-zhong. A New Method to Eliminate the CPU Context Switching Cost by the Effects of any Length of Time Slice[J]. Microelectronics & Computer, 2015, 32(2): 92-96.

一种任意时间片长度对CPU上下文切换代价影响消除的新方法

A New Method to Eliminate the CPU Context Switching Cost by the Effects of any Length of Time Slice

  • 摘要: 分析并量化了操作系统任务调度时上下文切换对CPU性能影响,得出了任务上下文切换代价对CPU效率影响关系.在此影响关系的基础上,提出了一种可行的Hyper-Scheduling方法.此方法通过在CPU内部设置一条特殊的任务切换专用流水线数据通路,并在通用寄存器堆上寄生一个相同的寄存器堆(影子寄存器堆)和监视访存状态的寄生逻辑,来监视各硬件资源运行情况,实现在CPU硬件资源闲置状态时进行预先数据准备或任务保存.当任务切换时将这条特殊数据通路与CPU主数据通路流水线进行交换,使上下文切换时间可趋近于零,任务切换代价被消除,上下文频繁切换或时间片长度缩短至近于零的情况下,CPU效率仍能够保持性能最大化.

     

    Abstract: This paper analyzes and quantifies the impact of context switching on CPU performance when operating system task scheduling, it concludes that the relation of the cost of mission context switching to the CPU efficiency. On the basis of the study on the influence relation, this paper proposes a feasible Hyper-Scheduling engineering method. By setting up a special task switching dedicated data path line in the CPU, and insert the parasitic logic in each key parts of CPU will be used to monitor the running status of the hardware resources, this method realizes the CPU hardware resources idle state for data preparation in advance or task. Exchange the special data path and main CPU data path line when task switching, which makes the context switch time can be close to zero, task switching cost can be eliminated. This means even in the situation of frequency context switching or time slice length is very short, CPU can remain in the maximized efficiency.

     

/

返回文章
返回