Interrupts and Tasks Usually, timer interrupts are used for preemption For example, both RM and EDF rely on preemption In the simplest implementation, you fire a periodic timer Every time the timer ticks, you make a scheduling choice The NVIC even includes it's own "system tick" IRQ Unfortunately, a periodic interrupt is a waste of CPU time 20us every ms is 2% of CPU power With a slower clock, it can even be much worse You can't raise your HZ if you interrupt at every tick Linux deprecates the periodic interrupt since at at least 2011 And preemption brings in semaphores, spin locks, and more Device interrupts are used to restart a stopped task An interactive shell waiting for the serial port An SPI data transfer waiting for a reply But this creates the need for timeouts and recovery