On Mon, Oct 17, 2011 at 10:45 AM, unruh <[email protected]> wrote:

> On 2011-10-17, Chris Albertson <[email protected]> wrote:
> > 2011/10/17 Miguel Gon?alves <[email protected]>
> >
> >>  what are the best (meaning well supported) refclocks today to
> >> set up a new server?
> >
> >
> > Likely the GPS with the best PPS is the new Oncore.   But for NTP you
> don't
> > need 5 nanosecond accuracy.   From NTP's point of view 5 nS is not better
> > than 50 nS.
>
> In fact it is really hard for a computer to keep to 1us accuracy because
> of the delays in interrupt processing. The computer has to recognize the
> interrupt, deliver the notification that an interrupt has occured to the
> interrupt processing driver, the driver has to then ask the operating
> system for the local time to timestamp the interrupt. All that takes
> time, and it is hard to keep that under 1us.


The interrupt processor in the kernel is very simple and fast.  I think less
then a dozen lines of code are executed and none of them go off and make a
secondary request or do anything that requires much time.  Once you get into
the interrupt handler the only thing it does is (1) load a hardware counter
to memory and (2) set a bit to indicate #1 is done.   Nothing is logged to
disk and no secondary OS calls are made.  The logging  happens in a user
level routine that notices the set bit then reads the stored copy of the
counter

But still you are right, this works at the uS level.  I think getting to the
handler is the problem.  Sometimes the OS has to disable interrupts.  And
then always the state has to be saved.     In other words I think the
"bottle neck" is interrupt latency, not the processing that occurs inside
the handler.

Chris Albertson
Redondo Beach, California
_______________________________________________
questions mailing list
[email protected]
http://lists.ntp.org/listinfo/questions

Reply via email to