Understanding Linux kernel time management
Time is one of the most used resources in computer systems, right after memory. It is used to do almost everything: timer, sleep, scheduling, and many other tasks.
The Linux kernel includes software timer concepts to enable kernel functions to be invoked at a later time.
The concepts of clocksource, clockevent, and tick device
In the original Linux timer implementation, the main hardware timer was mainly used for timekeeping. It was also programmed to fire interrupts periodically at HZ frequency, whose corresponding period is called a jiffy (both are explained later in this chapter, in the Jiffies and HZ section). Each of these interrupts generated every 1/HZ second was (and still is) referred to as a tick. Throughout this section, the term tick will refer to the interrupt generated at a 1/HZ period.
The whole system time management (either from the kernel or user space) was bound to jiffies, which is also a global variable in...