From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_05,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:a37:e215:: with SMTP id g21mr12637914qki.37.1623603032669; Sun, 13 Jun 2021 09:50:32 -0700 (PDT) X-Received: by 2002:a25:75d6:: with SMTP id q205mr18369823ybc.339.1623603032529; Sun, 13 Jun 2021 09:50:32 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!feeder5.feed.usenet.farm!feeder1.feed.usenet.farm!feed.usenet.farm!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 13 Jun 2021 09:50:32 -0700 (PDT) In-Reply-To: <5470ede9-7036-4af7-8087-6dc8ff8f9ca0n@googlegroups.com> Injection-Info: google-groups.googlegroups.com; posting-host=174.71.119.33; posting-account=ix5KpAoAAAD9zo_4u1FxHVmn1uZn7U_d NNTP-Posting-Host: 174.71.119.33 References: <1d798609-8b73-4bc6-b74f-e435e8af8fedn@googlegroups.com> <26182d75-4a84-47d2-b151-bbcb01964fabn@googlegroups.com> <14166772-2507-4953-8843-57fe35b0f6fbn@googlegroups.com> <5470ede9-7036-4af7-8087-6dc8ff8f9ca0n@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <63c95f00-e760-43de-b374-3473b07b9dbfn@googlegroups.com> Subject: Re: non-preemptive tasking on GNAT 2020 Windows 10 multicore AMD From: Dan Winslow Injection-Date: Sun, 13 Jun 2021 16:50:32 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:62219 List-Id: On Sunday, June 13, 2021 at 11:46:23 AM UTC-5, Dan Winslow wrote: > On Sunday, June 13, 2021 at 11:44:00 AM UTC-5, Dan Winslow wrote:=20 > > On Sunday, June 13, 2021 at 8:16:31 AM UTC-5, Jeffrey R. Carter wrote:= =20 > > > On 6/13/21 2:06 PM, Dan Winslow wrote:=20 > > > >=20 > > > > Well. You are confirming that I shouldn't expect the behavior I am = looking for? How does linux do in this regard, I could use it if needed.=20 > > > with Xubuntu 21.04 and GNAT 11 I get=20 > > >=20 > > > ~/Code$ ./winslow=20 > > > 8 CPUs=20 > > > one=20 > > > Task one done, x=3D 1000001=20 > > > two=20 > > > Task two done, y=3D 1000001=20 > > > main done, x 1000001 y 1000001=20 > > >=20 > > > I get this with or without the scheduling pragma in gnat.adc.=20 > > >=20 > > > --=20 > > > Jeff Carter=20 > > > "Don't knock masturbation. It's sex with someone I love."=20 > > > Annie Hall=20 > > > 45=20 > > Yep, just found that myself. So, I guess since the tasks get mapped ont= o underlying os threads, windows has its own ideas and does things like aut= omatic priority promotion and other non-compliant stuff. Too bad, but I gue= ss kind of makes sense because windows does everything possible, most likel= y, to prevent any kind of thread monopolization. Would be nice if the gnat = windows version at least threw a warning that 'hey, it's legal, but it aint= gonna work on windows'.=20 > >=20 > > So, works perfectly on linux. Probably would on windows too if I knew h= ow to swap out for a pthreads implementation on windows.=20 > >=20 > > Thanks! > Odd that it doesn't require the gnat.adc pragma though. I suppose linux i= s counting on delay statements or other sync points to swap. For what I nee= d, that's perfect. Order of start on the two tasks is random on linux, too. It's usually task = one but sometimes task 2 starts first.