Mode of Operation
Before taking a closer look at the existing data structures and the implementation of the algorithms, let's illustrate the principle of timer management by reference to a simplified example, since the algorithm used by the kernel is more complicated than might be expected at first glance. (This complexity brings its rewards in the form of greater performance that could not be achieved with simpler algorithms and structures.) Not only must the data structure hold all the information needed to manage timers,7 but it must also be capable of being scanned easily at periodic intervals so that expired timers can execute and then be removed. Figure 15-6 shows how timers are managed by the kernel.
tvl tv2 tv3 tv4 tv5 tvec_base_t
Continue reading here: Figure 1SB Data structures for managing timers
Was this article helpful?