On 2/14/2012 2:54 AM, Chris Albertson wrote:
Perhaps a silly question, but, does the "tick" that drives the OS software
clock originate from the RTC or from the CPU master clock at 2 GHz or
whatever?  Just trying to understand how this stuff works.

Look in the directory
/sys/devices/system/clocksource/clocksource0

On Linux there are two files.  One lists all the possible clock source
the kernel found on your hardware.  There might be more then a few
depending on what kind of computer you have.   Remember Linux runs on
everything from cell phones to mainframes

The other file tells you with clock source is actually being used.
There is a way to force the selection at boot time.

All that said, on a modern PC lilely you are using the hpet to cause
periodic interrupts, each interrupt advances the system time by one
tick.  hpet is the high precision timer.  Google will tell you all
about hpet.

   Ticks are between 100Hz and 1000Hz.  I think 1000Hz is common.  It
is adjustable at boot time also

I'd bet it is completely different on Windows systems an even other UNIXes

Chris Albertson
Redondo Beach, California

HI Chris,

Thanks for the info. What a mess of different methods to create a clock tick. I think I'll focus on trying to use the system rather than trying to understand it. 8-)

Sincerely,

Ron


--

(PS - If you email me and don't get a quick response, don't be concerned.
I get about 300 emails per day from alternate energy mailing lists and
such.  I don't always see new messages very quickly.  If you need a
reply and have not heard from me in 1 - 2 weeks, send your message again.)

Ron Frazier
timekeepingdude AT c3energy.com

_______________________________________________
questions mailing list
[email protected]
http://lists.ntp.org/listinfo/questions

Reply via email to