comp.lang.ada
 help / color / mirror / Atom feed
From: Buz Cory <weltseer@BuzCo.PenguiPowered.com>
Subject: Re: Duration vs. Ada.Real_Time
Date: Thu, 08 Feb 2001 03:32:44 GMT
Date: 2001-02-08T03:32:44+00:00	[thread overview]
Message-ID: <20010208.3324400@buzco.penguinpowered.com> (raw)
In-Reply-To: 3A75B91C.654A86EE@acm.org

On 1/29/01, 1:40:29 PM, Marin David Condic <mcondic.auntie.spam@acm.org> 
wrote regarding Re: Duration vs. Ada.Real_Time:

[snip]

> BTW: I've asked before when I was dealing with that same situation
> - two machines that want to operate in lockstep.

You failed to say to what degree of precision. Am assuming below that
a discrepancy on the order of 10ms is OK.

> Do you know of any sort of formal, published writings on
> algorithms to do this? We had a 1.024mSec interrupt on both sides
> - no clock so no "delay until"

You mean you had a periodic interrupt and weren't counting?

If you were counting, then there was your clock. It may have had to
be set externally to sync w/ external time, but it was still there.

One would assume that the 1.024 ms interrupt came from a HW device
counting 1MHz pulses. If that register was readable somehow, now you
had a time resolution of 1µs.

Naturally, if the 1MHz signals are separately generated for each
box, there will be some drift (though I wouldn't expect a lot). One
way to solve this would be to provide the base tick externally.

> - and some hardware signaling between the two. We came up
> with ways of doing the sync, but I kept thinking in the back of my
> mind that better/faster/easier ways of doing it. Not horribly
> important now since I'm not dealing with that same problem, but it
> has always bothered me enough to still want to read some
> books/papers on the subject.

Assuming that since the boxen had to be in lock-step, they were
networked in some way, there is definitely a software solution

Assuming an ethernet LAN, synching w/ an error < 10ms is claimed by
the author. (Maybe an order of magnitude worse for a WAN.)

The docs that came w/ xntpd may be read at:
    "http://BuzCo.PenguinPowered.com/imports/net/time/".
Unfortunately, the PenguinPowered.com nameserver is down as I write
this :-< (Between ISP problems and nameserver problems I seem to get
some 80% availability).

You can find basic material on this at "http://www.ntp.org/".
The software may be downloaded (documented in *_great_* detail) from
    "ftp://ftp.udel.edu/pub/ntp/".

The algorithms, the software, and the related RFCs (referenced in
the docs) are all the work of one Dr. David Mills, who seems to be
The Expert on network time synchronization. I know I could not
follow the details, I just use the software.

BTW, using the supplied software assumes that you are running some
variant of Un*x; the provided daemon runs in user-space but can talk
to the kernel software that maintains time-of-day.

The code is in "C" and gives some warning messages when compiled w/
gcc.

Hope this helps,
== Buz :)
--
Buz Cory of Buzco Systems -- New York NY USA 
http://BuzCo.PenguinPowered.com
<netadm@BuzCo.PenguinPowered.com> (Buz as Net Admin)
write to <helpdesk@BuzCo.PenguinPowered.com> for FREE help with:
    Installing/Configuring Linux
    Getting started with the Ada Programming Language.
Replacing DOS/MS-Win with Linux is like replacing a Fokker with an 
F14.
Programmer? Bugs got you down? Ada is the answer.






  reply	other threads:[~2001-02-08  3:32 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <980495512.529981@edh3>
     [not found] ` <8mac6.9236$R5.473526@news1.frmt1.sfba.home.com>
2001-01-26 15:30   ` Duration vs. Ada.Real_Time Robert Dewar
     [not found] ` <3A71814B.7E8CCF60@acm.org>
2001-01-26 15:33   ` Robert Dewar
2001-01-26 20:58     ` Marin David Condic
2001-01-26 21:32       ` Ted Dennison
2001-01-27  5:01         ` Keith Thompson
2001-01-27 14:40           ` Marin David Condic
2001-01-27 14:34         ` Marin David Condic
2001-01-28  0:18           ` Robert Dewar
2001-01-29 14:54           ` Ted Dennison
2001-01-29 18:40             ` Marin David Condic
2001-02-08  3:32               ` Buz Cory [this message]
2001-02-08 15:34                 ` Marin David Condic
2001-02-10  3:08                   ` Steve Whalen
2001-01-28  0:13       ` Robert Dewar
2001-01-29 14:02         ` Marin David Condic
2001-01-30 14:33         ` Stephen Leake
2001-01-31 14:55           ` Marin David Condic
2001-01-31 16:03           ` Ted Dennison
2001-01-31 19:16             ` Marin David Condic
2001-01-31 20:53               ` Ted Dennison
2001-01-31 21:30                 ` tmoran
2001-01-31 21:47                 ` Marin David Condic
2001-02-01 14:18                   ` Ted Dennison
2001-01-28 19:32 ` Simon Wright
2001-01-31  6:13   ` Robert Dewar
2001-01-31 15:07     ` Marin David Condic
2001-02-01  5:43       ` Robert Dewar
2001-01-31  5:51 Christoph Grein
2001-02-01  6:27 ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox