|
计算机应用 2005
Development of a large number of timers in communcaition system
|
Abstract:
A method to realize a large number of timers quickly by software was proposed,and the software was called Timer Management Module(TMM).TMM set m timing precisions and n time-out values for each precision.The timers with same precision and time-out value were linked together,TMM set m circular pointers,named Pos1..m],which recorded the sequence number of the links,in which the timers had latest expired.When creating a timer,TMM first chose an appropriate timing precision according to the time-out value,and calculated the position,then insertd the timer node into the corresponding link.The circular pointers Pos,driven by system clock,moved around with their own frequency. When a circular pointer moved to a certain position,all timers in the corresponding link had already expired.By no sorting and reducing the comparison times, the algorithm cuts down the overhead of management timers greatly.