BigDumbDinosaur wrote:
If I/O is occurring when the timer interrupts, then servicing the jiffy IRQ will be delayed by the amount of time required to service I/O interrupts.
If I understand correctly then in that example I/O interrupts have higher priority than timer interrupts? I'm asking, because on a real-time minicomputer I worked with in the past this was done differently (it implemented an efficient time-sharing system as well, as a variable-priority list of tasks managed by a real-time process).
This system had 16 interrupt levels (each supported by a full register set, on later, faster models by a register file), with level 0 the lowest and level 15 the highest. Level 0 was the idle loop. Hard disk interrupts were managed by level 11. The real-time clock was level 13, and the only higher one on a normal system was internal interrupts on level 14 (to handle things like bus errors etc.).
(Level 15 was only ever used by CERN and was thus called the 'Cyclotron level' - it had only one interrupt source).
The thing about interrupts from real-time clocks is that you know exactly how long it will take to serve.. unlike I/O. So you can accomodate for that when designing the I/O system. The other way around makes the timer interrupt handling unpredictable.
-Tor