Maker Pro
Maker Pro

Why aren't computer clocks as accurate as cheap quartz watches?

M

Mxsmanic

Why do the battery powered clocks in personal computers tend to keep
worse time than quartz watches, even the $1 ones?

Apparently accurate timekeeping is still not a priority for
motherboard manufacturers. My old HP Vectra XU keeps very good time,
but it's an exception to the rule (in the days when it was built, HP
had a reputation for precision).
I thought that the problem was temperature swings in the computers
(25-38C), but a couple of cheapo watches taped inside the computers
kept better time.

The clocks are inaccurate to begin with; the small variations in case
temperature are not the source of inaccuracy. The clocks are very
consistent in their inaccuracy--in other words, they keep good time,
but they keep the wrong time, because they are inaccurately calibrated
at the factory.

The problem isn't limited to PCs. I recall mainframes that were off
by minutes per day. Surprisingly, for a very long time, most
computers were not equipped with any kind of useful real-time clock,
and many operating systems "estimate" the correct time based on
internal dispatch timers and things like that, which are invariably
very inaccurate. PC operating systems have traditionally done this,
too, because originally there was no RTC, and there has never been a
standard, high-accuracy, high-resolution RTC in PCs.
 
M

Mxsmanic

I'm looking for a techical explanation.

Poor calibration at the factory, and the fact that the clock time is
often a blend of RTC time and various real or imaginary timers inside
the OS.
 
M

Mxsmanic

jakdedert said:
FWIW, there are utilities which will update your computer clock from the
National Bureau of Standards over the web.....

There's much more than that. There's NTP, which will keep your system
clock accurate to within milliseconds without too much trouble. You
can also get radio-controlled hardware clocks for installation inside
the machine, as well as GPS clocks for even better accuracy.
Radio-controlled clocks and NTP over broadband are grossly comparable,
but GPS is more accurate still. All of these are far more accurate
than the basic clock in the PC alone, which is often off by seconds
per day.
 
D

DBLEXPOSURE

The truth is, I could care less about what you think about what I say. You
are in no position to tell me what I should or what I should not do or have
done. If you where a man worth listening to, you would simply post your
opinion with no need to tell others how they should or should not have
written there post. Truth is, you get off on taking jabs at other rather
than simply posting what you think, (typical of a NG twit who cannot be
aggressive in the real world for fear of getting bones crushed) Oh, and by
the way, What you think it not, nessiccarily the only opinion that counts or
matters. So, like I said before, **** you! And I'll post answers in what
ever fashion I wish and I will be the judge whether what I post is relevant
to the conversation. I don't need you to tell me that either.

Who the **** do you really think you are? Cause you aint shit to me....

And by the way, your little game of taking bits and pieces of previous
threads is as annoying as the five second sound bite that removes the true
context of the conversation and twists the words to suit your own purpose.
It is quite transparent as we can all go back and read the thread as it was
originally posted. Idiot.

Truth of the matter is that the program, "D4" is relevant to this
conversation as somebody else may come along and read this thread who never
knew the situation could be correct with a small transparent bit of
software. That person may appreciate the fact that I brought that subject
to the table. Oh, and By the way, the OP might as too. You see, the world
doesn't revolve around you and what you think..

Oh, and here is my complete response to Rick Yeager

<sinip>

So what? I had offered an answer to that as well as offering a solution.
Perhaps you didn't read that part of the thread.

Now, Had I said your pc's clock will run slow because magic trolls and
ferries sneak in make adjustments to the master oscillator. That might
warrant an attack. But the rest of this crap is just that, crap!

you see my mind is not one dimensional, I might take a question and expound
on the answer to not only give a reason why this happen but also offer a way
to correct it.

And by the way, my last comment was prefaced, "Just in case anybody is
interested". Obviously you are not so the post was not intended for you.
In other words, Bug Off, pedal on and get a life!


</snip>

You took 8 word out 4 paragraphs... Who do you really think you are?

I'll ask you again to kindly **** off.......
 
M

Michael A. Terrell

Why do the battery powered clocks in personal computers tend to keep
worse time than quartz watches, even the $1 ones?

The computer batteries measure fine, at least 3.15V.

I thought that the problem was temperature swings in the computers
(25-38C), but a couple of cheapo watches taped inside the computers
kept better time.


Watches have a trimmer to adjust the frequency, but PC motherboards
don't, anymore. Some 286 and 386 motherboards had them, and could be set
to give fairly accurate time. I don't really care. I use software that
updates the clock from time to time and sets it to a few milliseconds
from the atomic clocks at NIST.
 
M

Mxsmanic

Well I can't answer your question but for those who don't know, XP has
an automtic time synchronization feature which operates weekly.

If you want time that is perceptibly correct (that is, no perceptible
difference between the PC clock time and a reliable standard reference
when you watch or listen to both), you need to reset the clock of most
PCs several times _per day_, as it may be off by as much as several
seconds in a day.
You
have to be on line of course. The synchronization can also be done
manually. See: Start>Control Panel>Date and Time. My pc keeps time
very well.

There's also a registry entry that can be modified to make the system
synchronize more often.
 
M

Mxsmanic

James said:
How about offering some insight rather than just a big buzzer?

Sixteen-bit versions of Windows never did preemptive multitasking.
Thirty-two bit versions did and do, for 32-bit applications (but not
for 16-bit applications). Windows NT does it for all applications,
although a single MS-DOS virtual machine counts as one application (so
multiple 16-bit apps running inside it are not preemptively tasked
among themselves, for compatibility).
Depends on the version really, Win 3.1 and earlier didn't offer
pre-emptive multitasking, when an application was minimized it generally
ground to a halt.

It would not grind to a halt if the current application relinquished
control properly and frequently. However, all applications in the
system had to be well behaved in this way, or things would stall.
Win 9x was a big improvement over this but still mediocre.

It only did it for 32-bit applications, and overall Windows 9x was
very poorly written.
Win NT/2K/XP is better still, and are generally quite good
OS's, but the multitasking is still rather poor compared to several
other OS's on the market.

Not true. Multitasking on all the NT-based versions of Windows is
excellent. On those rare occasions when one application stalls
another on an NT-based OS, it's not because of any defect in
multitasking, it's because of interprocess signalling that stalls
applications by (potentially poor) design. For example, the Windows
Explorer is a potential source of multiple-application stalls,
although the latest versions of Windows Explorer are far better
behaved than the original (which was lifted from Windows 95, and was
thus very poorly written).

Of course, systems such as UNIX have been successfully multitasking
since the beginning, given that they were originally timesharing
systems by design.
 
M

Mxsmanic

Michael said:
Watches have a trimmer to adjust the frequency, but PC motherboards
don't, anymore. Some 286 and 386 motherboards had them, and could be set
to give fairly accurate time. I don't really care. I use software that
updates the clock from time to time and sets it to a few milliseconds
from the atomic clocks at NIST.

Even if you have a very accurate clock, you still need to synchronize
it with NTP or some similar utility if you are using the Internet.
Once you start communicating with other machines, it's vital that all
the machines be synchronized with respect to time of day--just having
a clock that accurately measures time isn't enough. So if you're on a
network, either you must synchronize your machine to the Net with
software, or you must have a hardware clock that synchronizes to some
external source, such as a GPS or radio-controlled clock.

In fact, if your computer is _not_ connected to any other computer,
then what you need is a clock that is very stable and accurate in its
measurement of time intervals. But if your computer is connected to
other computers, this stability and accuracy is far less important
than synchronization with the other computers.

If you have an isolated PC with a very accurate clock, you can set it
by hand, and perhaps it will be within one second of the correct time.
However, since the clock is accurate, you can be sure that it will
never be _more_ than one second away from the correct time. In other
words, the initial error is also the maximum error, and a one-second
error is often okay for a stand-alone PC as long as the error never
increases. Since the computer is not communicating with anything
else, the one-second error is not a problem.

If you have a PC connected to other PCs, the most important thing is
to have all PCs set to the same time. In theory, it doesn't even
matter if they drift, as long as they all stay locked together. So
clocks that are fast by a second a day are not a problem, as long as
all the clocks are off by the same amount. In the case of multiple
connected PCs, then, synchronization with each other takes priority
over long term stability with respect to the actual time of day.

Finally, if your PC is connected to the Internet, you need
synchronization with the "real" time of day, as maintained by atomic
clocks around the world. This ensures that your PC will have the same
time of day as all the other PCs on the network worldwide (assuming
they have accurate clocks). So you need software that synchronizes
your PC to the correct time of day. You don't actually need a very
accurate clock on the PC, though, because good synchronization
software--combined with a good operating system--will continually
"discipline" your local clock and ensure that the time of day on your
machine precisely matches the actual time of day worldwide.

In summary, if you have a PC that is continuously connected to the
Internet (broadband, for example), all you need is software that will
synchronize the clock regularly (and most operating systems have this
now--Windows XP does it automatically). If you have a PC that is
isolated and not connected to anything, _then_ you need either an
extremely accurate PC clock, or some external reference that you can
use to keep the clock on time, such as a radio-controlled clock, a GPS
clock ... or your own wristwatch.
 
In said:
A long time ago, I regularly had good luck by substituting crystals
taken from watches, but when I tried the crystals from computer clocks
in some of those watches, their accuracy would worsen considerably.
And crystals I bought from parts suppliers were so bad that I switched
to getting my crystals from stick-on clocks for cars
A National Semiconductor note for one of their clock chips mentioned
that common crystals varied from 1-100 ppm accuracy per year (~30 secs.
to almost 1 hour), the worst by far being those sealed with solder, the
best sealed in glass or without heat.

Got any pictures to examplify the solder vs glass seal ?
 
D

David Maynard

James said:
D



How about offering some insight rather than just a big buzzer?

Wasn't necessary as I doubt anyone in here is running 3.1 or older.
Depends on the version really, Win 3.1 and earlier didn't offer
pre-emptive multitasking, when an application was minimized it generally
ground to a halt. Win 9x was a big improvement over this but still
mediocre. Win NT/2K/XP is better still, and are generally quite good
OS's, but the multitasking is still rather poor compared

Not really but then 'poor' is a subjective term.
 
The question of why the PC clock is so inaccurate, and yet more expensive
than a cheapo watch is simply a matter of "how ya gonna get the
information out of the cheap watch, and into the PC?" The clock itself,
and the crystal are only a portion of the hardware required by a PC to
know what time it is. The additional requirements increase the sicon die
size, as well as the complexity of the design, so the higher cost is to be
expected. If you can get the time out of a cheap watch, in binary form, at
the proper levels, and the proper timing specs, without raising the price
of the $1 watch, a lot of people would like to hear from you ;-)

Well you don't need to get any data only the timeing reference signal. That
can then drive an ordinary RTC chip.

Maybe this could give some ideas?
http://homepage.ntlworld.com/electricstuff/casiowatch.html

A solder connection to the pulsetrain from the 32768 kHz crystal + adjusted
capacitor to the mainboard rtc. Or simple IrDa.
 
Sixteen-bit versions of Windows never did preemptive multitasking.
Thirty-two bit versions did and do, for 32-bit applications (but not for
16-bit applications). Windows NT does it for all applications,

No, windows NT does not pre-emptively multitask.

This is because it only multitasks, but it is not pre-emptive
multitasking. The kernel does not have complete control of each
application.
Not true. Multitasking on all the NT-based versions of Windows is
excellent.

It is very good, but it is not pre-emptive. OS/2, for one, uses
pre-emptive and it is so far ahead and superior to the way windows works,
folks would not believe it. The difference between the two is beyond night
and day.

The difference will prove to be in your definition. The original
definition has been absconded with by microsoft in order to make it appear
that their inferior implementation actually meets the requirements, so if
it is really important that you 'win' that's okay with me.

Mark
 
A

Andy Baxter

do_not_spam_me said:
Why do the battery powered clocks in personal computers tend to keep
worse time than quartz watches, even the $1 ones?

The computer batteries measure fine, at least 3.15V.

I thought that the problem was temperature swings in the computers
(25-38C), but a couple of cheapo watches taped inside the computers
kept better time.

Not an answer to your question, but if this is a problem for you and you
have a broadband or frequent dial-up connection, you can synchronise your
clock with a time server on the internet using a protocol called ntp.
 
W

w_tom

Win 16 code on Windows 95 executes "cooperative
multitasking". The application program must volunteer to pass
CPU access to the next application. Furthermore Win16 code is
non reentrant.

Windows 95 could only execute Win32 code using a flag called
Win16Mutex so that Win32 code, designed for pre-emptive
multitasking environments, would not crash in the 'mostly'
Win16 environment of Windows 9x/ME.

To run Win16 applications in the preemptive multitasking
environment of NT, those Win16 applications would execute
under NTVDM. Therefore Win16 applications could execute in a
pre-emptive multitasking environment called Windows NT.

To be a true multitasking system, all threads must be
reentrant. This NT does. To be preemptive multitasking, the
OS rather than the application programs must determine which
code has CPU resources. This too is done by NT. Neither is
done in Windows 9x. Some still confuse this difference
between Windows 9x/ME and the Windows NT/2000/XP operating
systems.

NT, however is not a superior real-time pre-emptive
multitasking (MT) system. NT was not designed as an efficient
real time OS because response to interrupts can take a
millisecond. But this discussion is about preemptive MT.
Windows 9x/ME is not pre-emptive multitasking. It is
cooperative MT. A legacy of DOS and Win 3.1 upon which it was
constructed. NT was built from scratch in the earliest 19990s
to use Win32 code (code that is also reentrant) and to be
preemptive multitasking. XP being only the latest version of
the NT Operating System.

Some preemptive multitasking OSes take it to the next level
- real-time preemptive multitasking. NT can perform real time
operations - just not fast enough - microsecond response - as
some high performance systems require.

OS/2 did provide preemptive multitasking when Windows 95
could only do cooperative MT. However OS/2 has no useful
graphical interface. Therefore OS/2 ended up in embedded
applications such as ATMs - where the system must be more
reliable - therefore system required a preemptive MT OS.
Obviously Windows 9x/ME suffer from that reliability weakness.
But NT is preemptive MT and has a graphical interface. NT was
Microsoft's answer to OS/2 when IBM and Microsoft finally had
a parting of the ways in early 1990s.

BTW, the early OS/2 that was first demonstrated by IBM - one
task could literally lock out other tasks. Even worse, the
IBM people did not even understand what multitasking was as we
showed them one application locking out other tasks. When
first released, bugs in OS/2 caused its preemptive MT
abilities to not perform correctly. A legacy of operating
system reliability when complex systems are written in
assembly language. And just another reason why OS/2 was not a
profitable product for IBM. OS/2 biggest success was taking
the embedded computer market away from DOS.
 
Well you don't need to get any data only the timeing reference signal.
That can then drive an ordinary RTC chip.

I thought the question involved the clocks on the MB. Lacking an external
device, or manually entering the time, the PC has to be able to read and
set the RTC at some point, and that kind of interface costs more than any
cheap quartz watch. Once the OS knows the real time, it can try its best
to keep it accurate, but PCs are not real time operating systems, so that
can't happen. There must be an accesible RTC device, with a data
interface, and control lines.

Did I miss something in your point?

Mark
 
M

Mxsmanic

No, windows NT does not pre-emptively multitask.

Yes, it does. I've seen the code.
This is because it only multitasks, but it is not pre-emptive
multitasking. The kernel does not have complete control of each
application.

It does preemptively multitask, and the kernel has complete control of
all applications.

You're still applying the principles of 16-bit Windows and Windows 9x
to the NT-based operating systems. The latter are completely different
operating systems, though, rewritten from scratch, and they don't have
anything in common with other versions of Windows except for the look
and feel of the user interface.
It is very good, but it is not pre-emptive.

It is both good and preemptive.
OS/2, for one, uses pre-emptive and it is so far ahead and superior
to the way windows works, folks would not believe it. The difference
between the two is beyond night and day.

OS/2 is dead and gone, and although it was superior in design to the
old versions of Windows, it was not superior to NT.
 
Yes, it does. I've seen the code.

No you haven't No one person has seen all those lines of code. If you
want people to believe you are privy to the inner workings of the NT
kernel, you will have to explain how you found the time to read and
understand so much of it that you can make such a bogus statement in
the first place.

Talk is cheap on usenet. No one is impressed. Hey, for all you know, I
was on the development team.
It does preemptively multitask, and the kernel has complete control of
all applications.

Nope. Like I said, you do not have the proper defintion, or if it makes
you feel better, we are not applying the same definition.
You're still applying the principles of 16-bit Windows and Windows 9x
to the NT-based operating systems. The latter are completely different
operating systems, though, rewritten from scratch, and they don't have
anything in common with other versions of Windows except for the look
and feel of the user interface.

Everyone knows NT/XP/2000 is not windows 95. Don't treat your readers
like they are dummies.

It is both good and preemptive.

Nope. Sorry.
OS/2 is dead and gone, and although it was superior in design to the
old versions of Windows, it was not superior to NT.


www.ecomstation.com

Hardly dead, and oh by the way, NT was built on early OS/2 code. NT and
2000 had plenty of OS/2 code in their kernel, and can even run text
mode OS/2 apps. If you had seen the code...... you would know that.
 
BTW, the early OS/2 that was first demonstrated by IBM - one
task could literally lock out other tasks.

I am not advocating it, I only pointed out that its multitasking was
true, pre-emptive, and vastly superior to any MS product. Oh, BTW, the
first versions of windows wouldn't even run a day without crashing and
had more bugs than lines of code. So what does that have to do with
anything?

Even worse, the
IBM people did not even understand what multitasking was as we
showed them one application locking out other tasks. When
first released, bugs in OS/2 caused its preemptive MT
abilities to not perform correctly.

And when first released, windows was a total disaster. Again, so what?
Stay in the present. At its peak in the late 90's, OS/2 was a cadillac
to M$'s yugo. You can always argue app support, but technically,
nothing holds a candle to OS/2. If MS was allowed to be crap for 10
years, and is now glorified, why do you think it matters that OS/2 had
problems at first as well? The SIQ was the cause of just about any hang
on any OS/2 system. When that was not an issue, NT could not stand up
to OS/2 for stability. When Billy glued that dopey GUI onto NT, its
reliability tanked.

There is a reason why OS/2 ran every ATM on the planet until the banks
sold out to billy. If your ATM works, its OS/2.
And just another reason why OS/2 was not a
profitable product for IBM.

OS/2 was not profitable for a lot of reasons, the largest of which came
out in the MS trial, when we all learned that gates blackmailed IBM
into killing it off. Again, totally irrelevant to the topic at
hand.Profits do not equate to quality and features. I would take a BMW
over a Ford any day, but Ford sells more product. Doesn't mean their
cars are better, it just means they sell more of them. Again, so what?
Windows NT does it for all

According to some people's warped definition of preemptive
multitasking, but NT's "idea" of it was not what preemptive really is,
as demonstrated in OS/2 (not early releases, like you are whining
about)
a parting of the ways>> in early 1990s.

Wake up. NT WAS OS/2 as taken by gates when he split from M$ Everyone
knows bill never invented anything, or wrote an OS from the ground up.
He took NT from IBM as part of the parting of the ways, and found
people to embellish it, except he took what you are whining about which
is the versions that could not do preemptive multitasking. Shoot, he
couldn't even pull the OS/2 code from the kernel until XP came around.
Such a brilliant mind he has.....


Wow. Dumbest statement I ever read on usenet. Apparently, you never,
ever saw OS/2 on a desktop. Most people will agree that the OS/2 Object
Oriented interface is superior in every way to anything M$ has ever
stolen. The OS/2 desktop is legendary. Can't believe you never saw
it.......

Guess that pretty much blows any credibility you were hoping to show
off around here.

No useful graphical interface. Yikes.... You really are clueless.
 
M

Mxsmanic

No you haven't.

Uh, yes, I have.
No one person has seen all those lines of code.

I haven't read every line, but I've seen most of the cool stuff. It
was a hobby of mine at one time.
If you
want people to believe you are privy to the inner workings of the NT
kernel, you will have to explain how you found the time to read and
understand so much of it that you can make such a bogus statement in
the first place.

You don't need to look at the code. Just write a program that runs in
a tight loop, and run it. If you can still switch to other tasks in
the system, you have preemptive multitasking. And on NT and its
descendants, you can do exactly that.
Talk is cheap on usenet. No one is impressed. Hey, for all you know, I
was on the development team.

No, you weren't.
Nope. Like I said, you do not have the proper defintion, or if it makes
you feel better, we are not applying the same definition.

I've spent part of my time writing operating systems for a living. I
have the right definition.
Everyone knows NT/XP/2000 is not windows 95.

But many of them don't seem to know much more than that, and they
don't seem to realize that NT/XP/200x have nothing to do with Windows
95 at all. They are a completely separate family of operating
systems.
Don't treat your readers like they are dummies.

I try to adapt as the situation warrants.
Hardly dead, and oh by the way, NT was built on early OS/2 code.

NT was built from scratch, as far as I know. There were disagreements
on development directions between Microsoft and IBM, and Microsoft
decided to go its own way.
NT and 2000 had plenty of OS/2 code in their kernel, and can even
run text mode OS/2 apps.

You can run MS-DOS apps, too, but that doesn't mean that NT contains
MS-DOS code.
If you had seen the code...... you would know that.

I don't remember if I ever looked at compatibility stuff. I wasn't
much interested in emulation.
 
M

Mxsmanic

I am not advocating it, I only pointed out that its multitasking was
true, pre-emptive, and vastly superior to any MS product.

NT's multitasking is true, preemptive, and as good as any.
Stay in the present. At its peak in the late 90's, OS/2 was a cadillac
to M$'s yugo.

The present is 2005, not the late 90s, and OS/2 is history.
According to some people's warped definition of preemptive
multitasking, but NT's "idea" of it was not what preemptive really is,
as demonstrated in OS/2 (not early releases, like you are whining
about)

Explain the exact differences in multitasking between the two systems,
and why OS/2 multitasking is "better."
He took NT from IBM as part of the parting of the ways, and found
people to embellish it, except he took what you are whining about which
is the versions that could not do preemptive multitasking.

Sometimes it's hard to keep track of the stories about whence NT was
"stolen." One day it's VMS, another day it's OS/2 ...
 
Top