RFC 1589 (rfc1589) - Page 2 of 37
A Kernel Model for Precision Timekeeping
Alternative Format: Original Text Document
RFC 1589 Kernel Model for Precision Timekeeping March 1994
simulator with code segments almost identical to the implementations,
but not involving licensed code, is available via anonymous FTP from
host louie.udel.edu in the directory pub/ntp and compressed tar
archive kernel.tar.Z. The NTP Version 3 distribution can be obtained
via anonymous ftp from the same host and directory in the compressed
tar archive xntp3.3g.tar.Z, where the version number shown as 3.3g
may be adjusted for new versions as they occur.
1. Introduction
This memorandum describes a model and programming interface for
generic operating system software that manages the system clock and
timer functions. The model provides improved accuracy and stability
for most workstations and servers using the Network Time Protocol
(NTP) or similar time synchronization protocol. This memorandum
describes the principles of design and implementation of the model.
Related technical reports discuss the design approach, engineering
analysis and performance evaluation of the model as implemented in
Unix kernels for Sun Microsystems and Digital Equipment workstations.
The NTP Version 3 daemon xntpd operates with these implementations to
provide improved accuracy and stability, together with diminished
overhead in the operating system and network. In addition, the model
supports the use of external timing sources, such as precision
pulse-per-second (PPS) signals and the industry standard IRIG timing
signals. The NTP daemon automatically detects the presence of the new
features and utilizes them when available.
There are three prototype implementations of the model presented in
this memorandum, one each for the Sun Microsystems SPARCstation with
the SunOS 4.1.x kernel, Digital Equipment DECstation 5000 with the
Ultrix 4.x kernel and Digital Equipment 3000 AXP Alpha with the OSF/1
V1.x kernel. In addition, for the DECstation 5000/240 and 3000 AXP
Alpha machines, a special feature provides improved precision to 1 us
(Sun 4.1.x kernels already do provide 1-us precision). Other than
improving the system clock accuracy, stability and precision, these
implementations do not change the operation of existing Unix system
calls which manage the system clock, such as gettimeofday(),
settimeofday() and adjtime(); however, if the new features are in
use, the operations of gettimeofday() and adjtime() can be controlled
instead by new system calls ntp_gettime() and ntp_adjtime() as
described below.
A detailed description of the variables and algorithms is given in
the hope that similar functionality can be incorporated in Unix
kernels for other machines. The algorithms involve only minor changes
to the system clock and interval timer routines and include
interfaces for application programs to learn the system clock status
and certain statistics of the time synchronization process. Detailed
Mills