[Info-vax] clock problems with OpenVMS x86 on VirtualBox

gah4 gah4 at u.washington.edu
Wed May 17 18:49:20 EDT 2023


On Wednesday, May 17, 2023 at 6:37:32 AM UTC-7, Dan Cross wrote:
> In article <5d2fe9bd-f475-44df... at googlegroups.com>,

(snip, I wrote)

> >IBM was either lucky or smart, in the design of S/370, except for that one. 
  
> >As well as I know, it mostly wasn't a problem until Y2K testing. Who would 
> >want a machine with the clock wrong on purpose?

> Who can say? Timezones have been a thing since railroads began 
> popping up. But I agree: it may have been considered totally 
> innocuous. Still, I find it odd that it wasn't considered for 
> virtualization particularly given that VM started life on S/360. 
> Then again, S/370 was 1970, and Popek and Goldberg didn't 
> publish until 1974. 
 
OS/360, which in later versions has support for S/370 hardware,
uses a different epoch.  But other than that, there is a standard
epoch, and you are supposed to add/subtract for time zones.

The usual epoch is midnight, Jan 1, 1900, I believe GMT.
(UTC wasn't invented in 1900.)  Using that one, the high order bit
is always 1, as no were built before 1971.  That is supposed to be
the test for the usual epoch.

Note that it overflows in 2042.

(snip)

> It strikes me that setting the clock must be a privileged 
> operation, and it wouldn't take much for the hypervisor to save 
> and restore the clock on switches between VCPUs (and of course 
> it would have its own offsets for maintaining time in each VM 
> relative to the host). In that case, allowing unfettered reads 
> wouldn't be too much of an issue. Perhaps that is what they do.
 
The design is that there is a button on the operators panel that you
press to allow changes.  But worse, there is no way to change it,
and keep the previous value.  (Funny, as IBM is pretty good at doing
that everywhere else.)  If you disable interrupts, you can minimize
the counts lost.  But you have to ask the operator to press the button.

The OS/360 interval timer, described above, is designed so one can
read the value at the same time (one instruction) as setting a new value.
No ticks are lost.  (Careful use of the MVC instruction.)




More information about the Info-vax mailing list