基于多线程和缓存机制的定时器管理算法  被引量:3

Timer Management Algorithm Based on Multithreading and Cache Mechanism

在线阅读下载全文

作  者:倪桂强[1] 陈志龙[1,2] 姜劲松[1] 马遥[2] 

机构地区:[1]解放军理工大学指挥信息系统学院,江苏南京210007 [2]南京陆军指挥学院,江苏南京210045

出  处:《计算机仿真》2015年第12期142-145,共4页Computer Simulation

基  金:国家863项目(2012AA01A509;2012AA01A510);国家自然科学基金(61402518)

摘  要:经典的哈希分级时间轮算法在管理大规模定时器时存在响应时间长、累积时延高等缺点。该文借鉴"高速缓存"思想,提出了一种时间轮改进算法(Cached And Timing Wheels,CTW),基于多线程和缓存机制,提前查找和存储即将超时的定时器。该算法能够充分利用多核CPU的性能,优化开启、查找和停止定时器的操作,提升大规模定时器的管理效率。实践表明,CTW算法在管理大规模定时器时能够缩短响应时间,消除累积时延,提高定时器精度。Hashed and hierarchical timing wheel algorithm, which is a classical timer management algorithm, has a long response time and the high cumulative delay in the management of large - scaled timers. This article takes the thought of the "cache", searches and stores timers that will be timeout in the future, a timing wheel algorithm named CTW( Cached And Timing Wheels) is proposed based on multithreading and cache mechanism. The algorithm takes full advantage of multi - core CPU performance, optimizes the timer operations of opening, seraching and stopping, improves management efficiency of large - scale timer. Practice result shows that the CTW algorithm can reduce the response time in the management of large - scaled timers, eliminate the accumulated delay, and improve the timing accuracy.

关 键 词:大规模 定时器 哈希分级时间轮 多线程 缓存 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象