Configuration Options

Not only are there two distinct (but nevertheless related) timing subsystems in the kernel, but the situation is additionally complicated by the dynamic ticks feature. Traditionally, the periodic tick is active during the entire lifetime of the kernel. This can be wasteful in systems where power is scarce, with laptops and portable machines prime examples. If a periodic event is active, the system will never be able to go into power-saving modes for long intervals of time. The kernel thus allows to configure dynamic ticks,2 which do not require a periodic signal. Since this complicates timer handling, assume for now that this feature is not enabled.

Four different timekeeping scenarios can be realized by the kernel. While the number may not sound too large, understanding the time-related code is not exactly simplified when many tasks can be implemented in four different ways depending on the chosen configuration. Figure 15-3 summarizes the possible choices.

High-res

High-res

Dynamic ticks

Periodic ticks

Low-res

Low-res

Dynamic ticks

Periodic ticks

Figure 15-3: Possible timekeeping configurations that arise because of high- and low-resolution timers and dynamic/periodic ticks.

Computing all four possible combinations from two sets with two elements is certainly not complicated. Nevertheless, it is important to realize that all combinations of low/high res and dynamic/periodic ticks are valid and need to be accounted for by the kernel.

1 Updating the jiffies value is not easy to categorize between low- and high-resolution frameworks because it can be performed by both, depending on the kernel configuration. The fine details of jiffie updating are discussed in the course of this chapter.

2It is also customary to refer to a system with this configuration option enabled as a tickless system.

Continue reading here: Timer Activation and Process Accounting

Was this article helpful?

0 0