[ntp:questions] Preffered OS for a GPS based stratum 1

Unruh unruh-spam at physics.ubc.ca
Fri Oct 31 22:39:15 UTC 2008

Terje Mathisen <terje.mathisen at hda.hydro.com> writes:

>Spiffed wrote:
>> I've dug up an Oncore GT+ GPS receiver, matching antenna, and PPS 
>> stretching converter box. WinOncore shows a 'Time Solution one sigma' of 
>> 38ns, so it seems to be an acceptable ref clock for my purposes.
>> After surveying the computing hardware available, a Sun Ultra10 seems to 
>> keep the best time and is otherwise unused.
>> What OS do you recomend for the Ultra? Off the top of my head, I'm 
>> considering Solaris (is there PPS support in Solaris 10?), FreeBSD or 
>> NetBSD. My understanding is Linux 2.6 PPS support is rough at best.

Depends on what you want. PPS support probably does not belong in the
kernel anyway. You really need to examine the pps signals to make sure that
they are sane (eg roughly one second between successive signals, etc) and
the kernel is no place to be doing those sanity checks. Handling the PPS is
userspace is perhaps slightly cruder (getting the time in kernel space may
be slightly faster) but you could do an interrupt driven system where the
PPS triggers and interrupt whose only pupose is to get the time at which
the interrupt occured. Then those data values are massaged, filtered,
whatever, to give the data for ntp to discipline the kernel. I do that (PPS
onto a parallel interrupt which is times by an interrupt service routine,
and that data is placed onto /dev/gpsint device to be read off by userland
routines to feed to ntp via the shm refclock driver. I get about 2usec
resolution/accuracy as read from the scatter of the offset readings-- since
I have no way of independtly timing the gps timing routing. How much of
that is due to the ntp behaving badly in tracking rate changes of the cpu
clock, and how much is inherent I do not know. But since the clock on Linux
is 1usec quantization and the accuracy of my gps is 1 usec, I figure this
is about as good as it gets. I doubt that you can get consistant reading of
the cpu clock even from the kenrel to better than about 1us, whether on
linux or on BSD.

>FreeBSD is the canonical OS for a PPS box, search for some of phk's 
>articles on this subject!

Ie, I do not know what the problem with Linux is. 


>- <Terje.Mathisen at hda.hydro.com>
>"almost all programming can be viewed as an exercise in caching"

More information about the questions mailing list