Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are Linux Local timer interrupts?

All is in the title. Any links to good documentations are welcome.

like image 382
Manuel Selva Avatar asked May 12 '12 20:05

Manuel Selva


People also ask

What are interrupts in Linux?

An interrupt is simply a signal that the hardware can send when it wants the processor's attention. Linux handles interrupts in much the same way that it handles signals in user space. For the most part, a driver need only register a handler for its device's interrupts, and handle them properly when they arrive.

What is a local timer?

Definition of local time : time based on the meridian through a particular place as contrasted with that of a time zone.

What is the difference between timer and interrupt?

remember: timers are independent of the CPU. time period t (also called as clock period). interrupt is generated in every cycle. by the user.

What is the use of timer flag interrupt?

The Timer/Counter Interrupt Flag Register. The OCF2 bit is set (one) when a compare match occurs between the Timer/Counter2 and the data in OCR2 - Output Compare Register 2. OCF2 is cleared by hardware when executing the corresponding interrupt handling vector.


2 Answers

On SMP systems apic timer is used for scheduler / rescheduling threads.

On UP system pit timer is used for scheduler / rescheduling threads.

Normaly the PIT is no longer used anymore in SMP systems.

like image 126
user1954941 Avatar answered Oct 02 '22 13:10

user1954941


A less technical answer than Michael Burr's:

Some things need to be done every jiffy, doesn't matter on which CPU.
Other things need to be done every jiffy on each CPU. For example, checking if we need to switch to another process.

The local timer interrupt exists for the second type - whenever it's executed, we check them and do what's needed.

like image 38
ugoren Avatar answered Oct 02 '22 14:10

ugoren