Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a clock interrupt?

I can't find on the Internet a proper definition of this. I am wondering what is actually a clock interrupt and when does it occur:

  • Does it occur every clock tick?
  • Does it occur every second?
  • Is it some kind of an alarm that has to be triggered?
like image 949
piggyback Avatar asked May 09 '15 17:05

piggyback


1 Answers

Clock or timer interrupts are interrupts from your timers present on your board. These timers are configured during board initialization where you can define the interrupt period.

1. Does it occur every clock tick?

Timers do not depend on tick. Both are same. After each interrupt or tick a variable called jiffies is incremented. This variable shows number of ticks or interrupts from system boot.

2. Does it occur every second?

Timers are configurable. You can configure to generate interrupt after 1 second or 1 millisecond, etc.

3. Is it some kind of an alarm that has to be triggered?

Alarms use timer devices too. But ticks or interrupts and alarm are different. Alarm is started for some task but ticks are recorded from boot up and not modified manually.

Please refer to any SoC datasheet like omap or STM, etc and read the timer chapter.

For an introduction to timers, jiffies, and ticks in the Linux kernel,
check out Chapter 07 Time, Delays and Deferred work of the book Linux Device Drivers [3e].

like image 64
Shaibal Avatar answered Nov 08 '22 05:11

Shaibal