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.0 required=3.0 tests=BAYES_20,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:a05:620a:1003:: with SMTP id z3mr13251284qkj.490.1623602639713; Sun, 13 Jun 2021 09:43:59 -0700 (PDT) X-Received: by 2002:a25:cfc3:: with SMTP id f186mr19658105ybg.161.1623602639488; Sun, 13 Jun 2021 09:43:59 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!feeder1.feed.usenet.farm!feed.usenet.farm!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr1.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:43:59 -0700 (PDT) In-Reply-To: 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> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <14166772-2507-4953-8843-57fe35b0f6fbn@googlegroups.com> Subject: Re: non-preemptive tasking on GNAT 2020 Windows 10 multicore AMD From: Dan Winslow Injection-Date: Sun, 13 Jun 2021 16:43:59 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:62217 List-Id: On Sunday, June 13, 2021 at 8:16:31 AM UTC-5, Jeffrey R. Carter wrote: > 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 look= ing for? How does linux do in this regard, I could use it if needed. > 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 > Task two done, y=3D 1000001 > 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 Yep, just found that myself. So, I guess since the tasks get mapped onto un= derlying os threads, windows has its own ideas and does things like automat= ic priority promotion and other non-compliant stuff. Too bad, but I guess k= ind of makes sense because windows does everything possible, most likely, t= o prevent any kind of thread monopolization. Would be nice if the gnat wind= ows version at least threw a warning that 'hey, it's legal, but it aint gon= na work on windows'. So, works perfectly on linux. Probably would on windows too if I knew how t= o swap out for a pthreads implementation on windows. Thanks!