User manual
VSMP Reference
38
tendency of SIMH idea of system time (such as OpenVMS system time, when OpenVMS is executed on
SIMH) to fall behind wall clock time.
This “falling behind” happens because of a number of technical and semi-technical reasons: host timer
events are fired later then requested; it takes time for the hibernating thread to resume and start tracking
time; accumulating errors in rounding time data obtained from the host, SIMH timing mechanisms
dependence on VCPU calibration (i.e. instructions per second rate) which is subject to variations because
of concurrent host load and also inherently – because of inherent variations in the composition of
executed instruction set, page faults, synchronous IO operations executed on VCPU thread etc.; because
of OpenVMS suspension while SIMH console is in use or ROM console is in use; because of OpenVMS
suspension while host system was suspended and similar reasons.
VAX MP eliminates some of these sources of guest OS timing distortion
1
, but not all of them, and
OpenVMS system time drift vs. wall clock is still possible. TIMESYNC is intended to fix this drift and to
keep OpenVMS time in sync with host time.
TIMESYNC runs in OpenVMS kernel, as a part of kernel-resident VSMP module.
Every 5 seconds TIMESYNC compares OpenVMS system time with host time. If a divergence of more
than 1 second is detected, then TIMESYNC initiates adjustment process. Whenever possible, TIMESYNC
adjusts OpenVMS time gradually by increasing or reducing the size of OpenVMS system clock tick and
spreading system time adjustment over the next 5-second interval (thus accelerating or slowing down
virtual OpenVMS time flow over this interval), rather than performing the adjustment in one big abrupt
jump. Gradual adjustment is possible for OpenVMS time falling behind the host time by up to
approximately 50 hours or running ahead of host time by up to 5 seconds. Divergences within this range
will be handled by TIMSYNC by performing gradual adjustment over next 5-second interval. Divergences
outside of this range will be handled by TIMSYNC by performing one big abrupt adjustment, rather than
gradually.
TIMESYNC is enabled by VSMP LOAD command by default, however it is possible to disable it. In most
cases OpenVMS system administrator will want to have TIMESYNC enabled. However in case OpenVMS
installation runs NTP client obtaining time from another source, such as from NTP server over the
network, then TIMESYNC should be disabled since TIMESYNC and NTP client will interfere and be at
conflict with each other. Alternatively, TIMESYNC can be left enabled and NTP client be disabled instead,
leaving time adjustment job to TIMESYNC, assuming host time itself is synchronized from time server or
believed to be of satisfactory precision and TIMESYNC 1-second drift tolerance is also deemed to be
sufficient.
The rest of this section describes individual VSMP commands.
1
E.g. by using dedicated clock strobing thread rather than regular SIMH timing mechanism based on counting
VCPU cycles.