Summary

The kernel needs to keep track of time for various purposes, and there are also a good many aspects that must be considered to solve the problem. In this chapter, first you were introduced to the general concept of timekeeping and the difference between timers and time-outs. You have seen that the implementation of timers and time-outs is based on hardware that can manage the time. Typically, each system contains more than one component for this purpose, and you were introduced to the data structures that allow for representing these components and sorting them by quality. Traditionally, the kernel relied on low-resolution timers, but recent hardware progress and a rework of the timing subsystem have allowed the introduction of a new class of high-resolution timers.

After a discussion of the implementation of high- and low-resolution timers, you were introduced to the concept of dynamic ticks. Traditionally, a periodic timer tick was issued with HZ frequency, but this is suboptimal for machines where power is scarce: When a system is idle and has nothing to do, the tick is superfluous and can be temporarily disabled to allow components to enter deeper sleep states without being woken up at periodic intervals. The dynamic tick mode allows for achieving exactly this.

Time is also relevant for userspace processes, and thus I finally discussed various system calls that are available in this area.

Continue reading here: Page and Buffer Cache

Was this article helpful?

0 0