News for hackers. Stuff that matters.
Re:Windows 8 Benchmark Records No Longer Accepted by ck2 on Monday August 19, 2013 @10:04AM (#6237256)
Isn't this a problem on any os with cpu "speed stepping" ?

We lose seconds each day on our linux servers and have to use ntpd to stay in sync.

Re:Windows 8 Benchmark Records No Longer Accepted by jstanley on Monday August 19, 2013 @10:22AM (#6237353)
Even 10 seconds a day only amounts to ~0.01% discrepancy. In this article they're reporting up to 7% if I'm reading it correctly.

EDIT: 7% of a day is just over 1h40m.

Re:Windows 8 Benchmark Records No Longer Accepted by wmf on Monday August 19, 2013 @12:12PM (#6237996)
Isn't this a problem on any os with cpu "speed stepping" ?

No. Recent processors have a constant TSC frequency independent of the core frequency, so it's safe to use the TSC to measure real time. Older processors can use the constant-frequency PIT or APIC interval timers.

Re:Windows 8 Benchmark Records No Longer Accepted by wbl on Monday August 19, 2013 @10:40AM (#6237459)
The real-time clock on the motherboard should correct for this.
Re:Windows 8 Benchmark Records No Longer Accepted by dz0ny on Monday August 19, 2013 @10:53AM (#6237530)
Windows only reads clock at startup and writes it shutdown.
Re:Windows 8 Benchmark Records No Longer Accepted by archivator on Monday August 19, 2013 @11:04AM (#6237585)
And so does my Fedora install (let's not blame Redmond unnecessarily).

My Android phone is even worse - it drifts by about 5-10s a day. Not a nightmare but it's still a lot more than my (probably unrealistic) expectations of 21st century hardware.

Re:Windows 8 Benchmark Records No Longer Accepted by dspillett on Monday August 19, 2013 @11:30AM (#6237751)
> And so does my Fedora install (let's not blame Redmond unnecessarily).

It isn't particularly an OS probably at all at the root: it is a hardware problem. The RTCs in PC have historically not been terribly reliable so OSes tend to ignore them where at all possible.

The probably here is probably the same as seen inside VMs: the OS is trying to count timer interrupts and other such references to gauge the passage of time, but with CPUs changing their speeds constantly this in itself becomes difficult to make accurate.

Windows' default behaviour of occasionally checking an external time reference (IIRC it checks approximately three times per day if your machine is on 24 hours) is often inadequate IMO though. Much better would be to use proper (relatively constant) NTP checking and clock skewing, though that imposes an extra infrastructure load.

Re:Windows 8 Benchmark Records No Longer Accepted by freehunter on Monday August 19, 2013 @11:07AM (#6237611)
My car also has a drifting clock without a dynamic CPU, losing two minutes every three months. It also doesn't have the ability to sync with NTP so it can't correct itself.

Apparently clocks are hard.

Re:Windows 8 Benchmark Records No Longer Accepted by harrytuttle on Monday August 19, 2013 @11:10AM (#6237629)
Clocks are easy. Even accurate clocks are easy. However, accurate clocks are expensive which is where the problem is
Re:Windows 8 Benchmark Records No Longer Accepted by dz0ny on Monday August 19, 2013 @11:42AM (#6237826)
Yep this is know problem on Android, relaying on system time for synchronizing is bad idea. One such example http://opensignal.com/reports/timestamps/
Re:Windows 8 Benchmark Records No Longer Accepted by qb45 on Monday August 19, 2013 @03:26PM (#6239159)
Here Redmond is blamed for not providing any API to access the physical RTC chip and for switching old APIs to use CPU cycle counter even on RTC-equipped systems.

You can still run hwclock on your Fedora box and get genuine RTC readout if you need it.

Re:Windows 8 Benchmark Records No Longer Accepted by cnvogel on Monday August 19, 2013 @04:11PM (#6239470)
hwclock will only give you 1second resolution, because the RTC chip can't do better. But querying the RTC directly is dog slow by todays standards, it's accessed via 8-bit port IO where one access eats up thousands of cpu cycles on a modern chip.

The really old way of timekeeping was to basically advance the system time by a constant amount, in an interrupt routine which might have been triggered by the ancient timer chip, and interpolation done between those ticks using the cpu TSCs.

And actually hwclock accesses /dev/rtc* which is just an arbitrary character devices (which the kernel indeed can use to initialize its notion of time on boot up), it's never accessed with the standard syscalls gettimeofday() or clock_gettime().

So while I really like MS bashing from time to time, in this case it's probably not too negligent of them, there might even be a standard way of informing the OS kernel about a change in TSC speed?

Re:Windows 8 Benchmark Records No Longer Accepted by ape4 on Monday August 19, 2013 @01:16PM (#6238343)
I'd think it would be good for either OS to update the RTC occasionally. So when it does reboot the RTC is sort of accurate.