close

Вход

Забыли?

вход по аккаунту

код для вставкиСкачать
Physical Clocks
Topics
r Physical Clocks
Clocks
r
A computer has a timer, not a clock.
r A timer is a precisely machined quartz
crystal oscillating at a frequency that
depends on how the crystal was cut and the
amount of tension.
Clocks
r Two registers are associated with the crystal:
a counter and a holding register.
m
m
m
m
m
Each oscillation of the crystal decrements the
counter by one.
When counter is 0, an interrupt is generated.
Each interrupt is called a clock tick.
At each clock tick, the interrupt procedure adds
one to the time stored in memory. The counter is
reinitialized by the value in the holding register.
A timer can be programmed to generate an
interrupt n times per second.
Clocks
r Knowing the number of times interrupts
occur in a second allows for time to be
recorded
Clocks
r BTW, on each of the computers, the crystals
will run at slightly different frequencies,
causing the software clocks gradually to get
out of sync. This is called clock skew or clock
drift.
r Ordinary quartz clocks drift by ~ 1 sec in 1112 days. (10-6 secs/sec).
r High precision quartz clocks drift rate is ~
10-7 or 10-8 secs/sec
1/--страниц
Пожаловаться на содержимое документа