From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,8c3f76cf9b2829c4 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-02-07 19:34:48 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!falcon.america.net!sunqbc.risq.qc.ca!newsfeed.cwix.com!sjc-peer.news.verio.net!news.verio.net!iad-read.news.verio.net.POSTED!not-for-mail From: Buz Cory Message-ID: <20010208.3324400@buzco.penguinpowered.com> Subject: Re: Duration vs. Ada.Real_Time Reply-To: Buz Cory References: <980495512.529981@edh3> <3A71814B.7E8CCF60@acm.org> <94s5bl$r1r$1@nnrp1.deja.com> <3A71E4F6.6D7015AD@acm.org> <94sqch$fls$1@nnrp1.deja.com> <3A72DC5E.4C1CE092@acm.org> <954074$qpq$1@nnrp1.deja.com> <3A75B91C.654A86EE@acm.org> X-Priority: 3 (Normal) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Newsgroups: comp.lang.ada X-Newsreader: Mozilla/4.0 (compatible; StarOffice/5.1; Linux) Date: Thu, 08 Feb 2001 03:32:44 GMT NNTP-Posting-Host: 207.198.184.214 X-Complaints-To: abuse@verio.net X-Trace: iad-read.news.verio.net 981603165 207.198.184.214 (Thu, 08 Feb 2001 03:32:45 GMT) NNTP-Posting-Date: Thu, 08 Feb 2001 03:32:45 GMT Organization: Verio Xref: supernews.google.com comp.lang.ada:4961 Date: 2001-02-08T03:32:44+00:00 List-Id: On 1/29/01, 1:40:29 PM, Marin David Condic = =20 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=A0ms interrupt came from a HW device counting 1MHz pulses. If that register was readable somehow, now you had a time resolution of 1=B5s. 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, =3D=3D Buz :) -- Buz Cory of Buzco Systems -- New York NY USA=20 http://BuzCo.PenguinPowered.com (Buz as Net Admin) write to 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=20 F14. Programmer? Bugs got you down? Ada is the answer.