[ntp:questions] Time server question
unruh at invalid.ca
Sat Jul 20 15:49:10 UTC 2019
On 2019-07-20, Chris <xxx.syseng.yyy at gfsys.co.uk> wrote:
> On 07/19/19 21:47, William Unruh wrote:
>> No. The mechanism is clear. While one is answering its interrupt the
>> other gets to wait. So, it is the earliest one that is closest to
>> "right" Ie, do not try to use more than one interrupt on the same
>> computer. It does not work
> I think we are at cross purposes here. What i'm saying is that if there
> are 2 sources of pps signals, say from 2 time servers, there will be a
> slight offset between the two, so how to determine which is the accurate
> one ?. With 3 or more pps sources, those with the least offset
> could be chosen for analysis, to find a median value.
Again, IF your system really reacted to the PPS signal instantly,
thenthe question you ask makes sense. But since both PPS signals come in
at the same time (<1us difference) the way the system reacts to them
becomes crucial In that case, the first IRQ the system reacts to blocks
the other for a few usec.
> Of course, host processing must introduce uncertainty, but would assume
> that ntp is designed to mitigate that ?.
No, it is not. ntp works by interupts, and the first thing that ntp asks
the interrupt handler to do is to read the system clock. That takes a
while, and also blocks any further interrupts while it is reading the
system clock. Once it has rad that, it releases the itnerrupts for
another to take over if it wants, because it has the only time
seneistive data it needs.
(or at least that is how a good handler behaves Whether for example
ldattach behaves properly is unclear to me. It looked to me when I once
looked at it like there is a large amount of processing that goes on in
the interrupt handler).
More information about the questions