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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a24:25d4:: with SMTP id g203-v6mr9912903itg.37.1524600259771; Tue, 24 Apr 2018 13:04:19 -0700 (PDT) X-Received: by 2002:a9d:5c8d:: with SMTP id a13-v6mr1740779oti.6.1524600259581; Tue, 24 Apr 2018 13:04:19 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!maths.tcd.ie!newsswitch.lcs.mit.edu!bloom-beacon.mit.edu!bloom-beacon.mit.edu!168.235.88.217.MISMATCH!feeder.erje.net!2.us.feeder.erje.net!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!f63-v6no4175132itc.0!news-out.google.com!15-v6ni4842itg.0!nntp.google.com!k65-v6no4173982ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 24 Apr 2018 13:04:19 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=85.167.213.200; posting-account=bPTmZAoAAAC_6HP9XLKB9aAAxBa6BuOR NNTP-Posting-Host: 85.167.213.200 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <25ef0a64-23bb-44f1-83a7-5e19b3cf017d@googlegroups.com> Subject: Re: A question about task's select delay alternative From: reinert Injection-Date: Tue, 24 Apr 2018 20:04:19 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2885 X-Received-Body-CRC: 3267713496 Xref: reader02.eternal-september.org comp.lang.ada:51692 Date: 2018-04-24T13:04:19-07:00 List-Id: I have had some success using entries with barriers for avoiding bogging do= wn the computer. reinert On Monday, April 23, 2018 at 8:25:39 PM UTC+2, NiGHTS wrote: > 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= Adacore GNAT compiler for a PC. Is it a loop constantly evaluating elapsed= time? Or is it some kind of timed interrupt? > >=20 > > What timed selective accept "does to the CPU" is not defined by the lan= guage.=20 > > It's determined by the compiler implementation and, probably, by the fe= atures 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 tha= t 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 >=20 > I have a number of busy threads I plan on launching, and I am wondering w= hat cost I would incur launching them in parallel with watchdog threads. Th= ey are used to monitor the busy threads for performance faults and have fai= l alternatives if the threads take too long.=20 >=20 > I'd hate to bog down the CPU with unnecessary delays. Do I need to worry = about lowering the CPU priority of such a non-essential thread in order to = improve overall system performance?