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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d5977aa20216d24a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-02 15:44:02 PST Newsgroups: comp.lang.ada Path: supernews.google.com!sn-xit-03!10.10.220.74.MISMATCH!sn-xit-04!supernews.com!europa.netcrusader.net!152.163.239.130!portc01.blue.aol.com!uunet!dca.uu.net!ash.uu.net!xyzzy!nntp From: Jeffrey Carter Subject: Re: Ada Tasks vs Linux processes X-Nntp-Posting-Host: e246420.msc.az.boeing.com Content-Type: text/plain; charset=us-ascii Message-ID: <3AC8FA76.C6AD4B53@boeing.com> Sender: nntp@news.boeing.com (Boeing NNTP News Access) Content-Transfer-Encoding: 7bit Organization: The Boeing Company X-Accept-Language: en References: <8H2y6.21501$ea6.2010619@news1.frmt1.sfba.home.com> Mime-Version: 1.0 Date: Mon, 2 Apr 2001 22:17:26 GMT X-Mailer: Mozilla 4.5 [en]C-CCK-MCD Boeing Kit (WinNT; U) Xref: supernews.google.com comp.lang.ada:6383 Date: 2001-04-02T22:17:26+00:00 List-Id: tmoran@acm.org wrote: > > >As far as delay 0.0 is concerned, it should yield the CPU to another > >task, if there's one ready to run. Generally, though, I use > >delay Duration'Small instead of delay 0.0; > LRM D.9(7) says the implementation must document the minimum delay > value that actually causes the task to block, while D.9(5) says a > delay of zero does not block, but is only "potentially blocking". > Even among compilers that don't implement Annex D, delay 0.0 usually > does not unnecessarily block, while any positive delay usually blocks > for two clock ticks, which on some systems can be a surprisingly long > time. Indeed. The Verdix compiler for SCO UNIX responded to "delay Duration'Small;" by delaying until the next clock tick. Since the clock ticked at 1 Hz, this corresponded to an average delay of 0.5 seconds. I saw some very slow code that resulted from the GRACE components using "delay Duration'Small;" to obtain a unique timestamp. Jeffrey Carter