[ntp:questions] Time server question
unruh at invalid.ca
Thu Jul 18 10:13:45 UTC 2019
On 2019-07-17, Chris <xxx.syseng.yyy at gfsys.co.uk> wrote:
> On 07/17/19 12:59, William Unruh wrote:
> > I had some indication that the parallel port was faster.
> That would make sense, since the rs232 devices tend to be slew
> rate limited for noise rejection. Found some DS8921 driver / receiver
> devices, originally designed for hard drive data path use. Delay
> around 10-15 nS or so, which should be more than good enough.
> Single 5 volt rail as well.
> > I suspect it will be a bad outcome. The rpoblem is that you get
> > interrupt contention, and the two interrups will put in time delays into
> > the second one processed.
> Remember hand optimising 6502 asm interrupt handlers years
> ago to tune timer accuracy, but that was a 1uS cycle machine,
> with handlers stretching out to 100uS or more.
> Don't have data, but modern cpus are much faster and in
> any case, there are other interrupt sources within the system
> which may contribute to jitter. Don't know enough to say, but
> perhaps ntp will average out the two to give a more accurate
> result ?. Would be interesting to hook it up and see what
> happens anyway...
Sure, but I do not have faith in the "averaging" If one is always 30us
after the other, then the average will always be out by 15us.
Writing a special interrupt handler (eg for the parallel port) whose
first action is to read the system clock, and it can then allow other
interrupts to be handled. That will be good to about 1us. (time to have
the interrupt hadler to be loaded into memory, and for it to read the
I think the main problem witht he serial port is that it seems to take
longer to read that the interrupt has occurred. But I did my
experiments 20 years ago.
More information about the questions