1= Kernel Model for Precision Timekeeping
2include::include-html.ad[]
3
4image:pic/alice61.gif[]
5{millshome}pictures.html[from 'Pogo', Walt Kelly]
6
7Alice finds the kernel a house of cards.
8
9== Related Links
10
11include::includes/misc.adoc[]
12
13'''''
14
15The technical report [2], which is a revision and update of an earlier
16report [3], describes an engineering model for a precision clock
17discipline function for a generic operating system. The model is the
18same hybrid phase/frequency-lock feedback loop used by +ntpd+, but
19implemented in the kernel. The code described in [2] is included in
20Solaris and Digital/Compaq/HP Tru64. It provides two system calls
21+ntp_gettime()+ and +ntp_adjtime()+ and can discipline the system clock
22with microsecond resolution. However, newer hardware and kernels with
23the same system calls can discipline the clock with nanosecond
24resolution. The new code described in [1] is in FreeBSD, Linux and
25Tru64. The software and documentation, including a simulator used to
26verify correct behavior, but not involving licensed code, is available
27in the
28https://www.eecis.udel.edu/~ntp/ntp_spool/software/nanokernel.tar.gz[nanokernel.tar.gz]
29distribution.
30
31Ordinarily, the kernel clock discipline function is used with the NTP
32daemon, but could be used for other purposes. The
33link:ntptime.html[ntptime] utility program can be used to control it
34manually.
35
36The kernel model also provides support for an external precision timing
37source, such as described in the link:pps.html[Pulse-per-second (PPS)
38Signal Interfacing] page. The new system calls are used by the
39link:kernpps.html[PPSAPI interface] and in turn by the
40link:driver_pps.html[PPS Clock Discipline] driver to
41provide synchronization limited in principle only by the accuracy and
42stability of the external timing source. Typical results with the PPS
43signal from a GPS receiver and a modern computer are in the 3 μs range.
44
45== References
46
471.  Mills, D.L., and P.-H. Kamp. The nanokernel. _Proc. Precision Time
48and Time Interval (PTTI) Applications and Planning Meeting_ (Reston VA,
49November 2000). Paper:
50{millshome}database/papers/nano/nano2.ps[PostScript]
51|
52{millshome}database/papers/nano/nano2.pdf[PDF],
53Slides:
54{millshome}database/brief/nano/nano.ps[PostScript]
55| {millshome}database/brief/nano/nano.pdf[PDF] |
56{millshome}database/brief/nano/nano.ppt[PowerPoint]
572.  Mills, D.L. Unix kernel modifications for precision time
58synchronization. Electrical Engineering Department Report 94-10-1,
59University of Delaware, October 1994, 24 pp. Abstract:
60{millshome}database/reports/kern/kerna.ps[PostScript]
61|
62{millshome}database/reports/kern/kerna.pdf[PDF],
63Body:
64{millshome}database/reports/kern/kernb.ps[PostScript]
65|
66{millshome}database/reports/kern/kernb.pdf[PDF]
673.  Mills, D.L. A kernel model for precision timekeeping. Network
68Working Group Report RFC 1589, University of Delaware, March 1994. 31
69pp. {millshome}database/rfc/rfc1589.txt[ASCII]
70
71'''''
72
73include::includes/footer.adoc[]
74