Re: Time synchronization between two LINUX computer

From: Jesse Pollard (pollard@tomcat.admin.navo.hpc.mil)
Date: Fri Mar 31 2000 - 14:21:55 EST


"Richard B. Johnson" <root@chaos.analogic.com>
> > Hello,
> >
> > I am looking for synchronization tools between two LINUX computers (without
> > adding Radio cards).
> > I know that SNTP (Simple Network Time Protocol) and NTP exists.
> > In a first short approach, I notice that the best granularity is only 1 ms.
>
> You can synchronize to or more computers by connecting them using RS-232C.
> You have one a master, the others a slave. The master sends 'HZ'
> characters per second. The slaves use the interrupt instead of timer
> channel 0. The UART FIFOs are disabled so you get one interrupt/character.
>
> Then you can use any method you want to set the slave's time. The time
> will now remain synchronous with the master.
>
> This is the 'cheapie' method.

Variation in time sync > 1ms since the intrrupt latency is large enough
to exceed this value for all but some real time kernel handling.

>
> If you want something a bit more robust, you can use CPUs with identical
> motherboards. Install a BNC connector, a cap, resistor and two diodes
> in place of the CPU board's crystal. Connect them all together to an
> external clock-generator. There is no master/slave so any machine can
> go down without taking down the rest. Set all the machines to the same
> time using whatever method you want. They will stay in sync.

Limitation is distance - the RC network is not precise enough for more than
about 5 feet. After that you get transmission loss, and weak impulses.
Plus the potential noise recieved (eased by shielded cables).

> If you don't synchronize the clocks of the computers, they will drift
> apart. This would require continuous SNTP correction, which occurs in
> steps. These steps might not be acceptable to your applications.

Of course. SNTP updates are much more reliable than other methods since
they include a predictive filter that covers both clock variation and
transmission delay.

The 1ms granularity is there due to context switching time, and a minimum
time that can be controlled. Less than 1ms control is well into the noise
range for synchronization for any but the most demanding RT systems (DSP
processing). Whenever multiple hosts (loosly coupled) are involved, it will
be next to impossible to synchronize better than 1ms.

-------------------------------------------------------------------------
Jesse I Pollard, II
Email: pollard@navo.hpc.mil

Any opinions expressed are solely my own.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Mar 31 2000 - 21:00:30 EST