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=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a6b:815f:: with SMTP id c92-v6mr11430926iod.22.1524507938641; Mon, 23 Apr 2018 11:25:38 -0700 (PDT) X-Received: by 2002:a9d:445c:: with SMTP id f28-v6mr1467887otj.2.1524507938513; Mon, 23 Apr 2018 11:25:38 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!81.171.65.14.MISMATCH!peer02.am4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!f63-v6no3232665itc.0!news-out.google.com!b185-v6ni3063itb.0!nntp.google.com!f63-v6no3232660itc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 23 Apr 2018 11:25:38 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=73.205.150.94; posting-account=Ru7E4QoAAAC_HiQ2D8LjZ7rh1mbTNcVn NNTP-Posting-Host: 73.205.150.94 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: A question about task's select delay alternative From: NiGHTS Injection-Date: Mon, 23 Apr 2018 18:25:38 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2765 X-Received-Body-CRC: 1001064092 X-Original-Bytes: 2615 Xref: reader02.eternal-september.org comp.lang.ada:51686 Date: 2018-04-23T11:25:38-07:00 List-Id: On Monday, April 23, 2018 at 2:06:28 PM UTC-4, Jeffrey R. Carter wrote: > On 04/23/2018 07:32 PM, NiGHTS wrote: > >=20 > > What does "delay" actually do to the CPU? In this case I am using the A= dacore GNAT compiler for a PC. Is it a loop constantly evaluating elapsed t= ime? Or is it some kind of timed interrupt? >=20 > What timed selective accept "does to the CPU" is not defined by the langu= age.=20 > It's determined by the compiler implementation and, probably, by the feat= ures of=20 > the OS, if any. So there's no Ada answer to your question. >=20 > I don't know how GNAT implements this, but my experience with it is that = blocked=20 > tasks don't use significant CPU. You can test this easily enough. >=20 > Why do you care? >=20 > --=20 > Jeff Carter > "When danger reared its ugly head, he bravely > turned his tail and fled." > Monty Python and the Holy Grail > 60 I have a number of busy threads I plan on launching, and I am wondering wha= t cost I would incur launching them in parallel with watchdog threads. They= are used to monitor the busy threads for performance faults and have fail = alternatives if the threads take too long.=20 I'd hate to bog down the CPU with unnecessary delays. Do I need to worry ab= out lowering the CPU priority of such a non-essential thread in order to im= prove overall system performance?