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-7-bit X-Google-Thread: 103376,f8311a3a7edd715 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-12-12 23:44:44 PST From: Brian Orpin Newsgroups: comp.lang.ada Subject: Re: Using "delay until" in real-time Date: Wed, 13 Dec 2000 07:43:50 +0000 Reply-To: abuse@borpin.co.uk (Brian Orpin This is valid) Message-ID: References: <915jl7$jt5$1@nnrp1.deja.com> X-Newsreader: Forte Agent 1.8/32.548 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: esk2461.ct.edinbr.gecm.com X-Trace: 13 Dec 2000 07:38:28 GMT, esk2461.ct.edinbr.gecm.com Path: supernews.google.com!sn-xit-02!supernews.com!isdnet!grolier!btnet-peer0!btnet-feed3!btnet!newreader.ukcore.bt.net!pull.gecm.com!esk2461.ct.edinbr.gecm.com Xref: supernews.google.com comp.lang.ada:3047 Date: 2000-12-13T07:43:50+00:00 List-Id: On Tue, 12 Dec 2000 16:27:31 GMT, Ted Dennison wrote: >On our system ticks come >at 240Hz, so that means that once every 52 seconds the executive >scheduler waits about 20ms instead of 16.6(6-repeating)ms. Of course >this wreaks havoc in our hard-realtime system. What we do for varying iteration rates is have a scheduler that runs on every tick. This then decides what to fire off and initiates the appropriate tasks. We do not use the real time clock but rely on external interrupts and a counter reset at the lowest rate. We do a 'mod = 0' to decide what needs to run. Doing this we have 5 'working' tasks running at different rates. Of course your incoming interrupt must be of an appropriate frequency! -- Brian Orpin BAE SYSTEMS, Edinburgh "If you really know C++, there isn't much you can't do with it, though it may not always be what you intended!" Tucker Taft 1998