Well, in truth it has nothing to do with interrupts. It is
just that that is the way most systems keep time. The REAL
definition of HZ is in its relationship to jiffies and
seconds.
I.e. jiffies * HZ = seconds, by definition.
Then we define interfaces that promise to return so many
jiffies from now and we keep execution time and time slice
times in jiffies. In order to keep these things true, it is
usual to set up some sort of timer to interrupt once each
jiffie. Now we can actually do this two ways. We can say
that the interrupt is a reminder to look at a "reliable
clock" and update the system time with what we find OR we
can use the interrupt to actually drive the system time.
The former is the more accurate way of doing things as it
eliminates interrupt latency. It also allows us to use a
more sloppy source of interrupts since they are just
reminders to check a clock and not actually driving the
clock. This, by the way, is what the high-res-timers patch
does. Doing things this way also allows one to reprogram
the timer interrupt hardware with out worrying too much
about loosing track of time. The HRT patch does this to
generate interrupts at sub jiffie intervals, but only when
required.
-g
>
> --
> Stevie-O
>
> Real programmers link their executables by hand.
>
-- George Anzinger george@mvista.com High-res-timers: http://sourceforge.net/projects/high-res-timers/ Real time sched: http://sourceforge.net/projects/rtsched/ Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/