[ntp:questions] What level of timesynch error is typical on Win XP?

Dave Hart davehart at gmail.com
Thu Oct 21 16:00:03 UTC 2010


On Thu, Oct 21, 2010 at 15:00 UTC, David J Taylor wrote:
> Windows can run NTP at real-time priority, if you give the NTP user that
> right.  Normal user processes will not then pre-empt NTP.

David is right.  Moreover, there's a bit of confusion around
scheduling priorities on Windows because they're not as
straightforward as other systems.  The scheduling entity is the
thread, which deep in the NT guts does have a simple numeric priority
(two, actually, a baseline and one affected by temporary scheduler
meddling that is the effective one).  However, that is not exposed at
the Windows API level, nor by Task Manager's "priority" column.

At the Windows level, there is a process-wide priority class, and a
per-thread priority level which are combined with any dynamic priority
adjustments to form the effective priority.  If you use Meinberg's
installer, the user account it creates is given the privilege need to
raise the process priority class to realtime.  ntpd on Windows raises
its priority class to at least high, or realtime if allowed.  Further,
the time-critical threads within ntpd are raised to the highest thread
priority (within the class), called time-critical.

MSDN has an encyclopedic article on Windows scheduling priorities at:

http://msdn.microsoft.com/en-us/library/ms685100(v=VS.85).aspx

The result is even without realtime, the ntpd threads that are
sensitive to scheduling latency are running at high priority class,
time-critical thread priority, which puts them above the vast majority
of threads in a typical system.  With realtime class, those threads
are running at the ultimate priority available.  That is without any
manual intervention to raise priority using Task Manager or other
tools.  You can tell from ntpd's event log (or configured log file)
what priority class it's using:

18 Oct 16:02:09 ntpd.exe[2492]: Raised to high priority class,
realtime requires Increase Scheduling Priority privilege (enabled with
secpol.msc).

or

16 Feb 22:18:54 ntpd.exe[804]: Raised to realtime priority class

Cheers,
Dave Hart



More information about the questions mailing list