comp.lang.ada
 help / color / mirror / Atom feed
From: Dan Winslow <dandwinslow@gmail.com>
Subject: Re: non-preemptive tasking on GNAT 2020 Windows 10 multicore AMD
Date: Sun, 13 Jun 2021 09:50:32 -0700 (PDT)	[thread overview]
Message-ID: <63c95f00-e760-43de-b374-3473b07b9dbfn@googlegroups.com> (raw)
In-Reply-To: <5470ede9-7036-4af7-8087-6dc8ff8f9ca0n@googlegroups.com>

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: 
> > 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: 
> > > > 
> > > > 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. 
> > > with Xubuntu 21.04 and GNAT 11 I get 
> > > 
> > > ~/Code$ ./winslow 
> > > 8 CPUs 
> > > one 
> > > Task one done, x= 1000001 
> > > two 
> > > Task two done, y= 1000001 
> > > main done, x 1000001 y 1000001 
> > > 
> > > I get this with or without the scheduling pragma in gnat.adc. 
> > > 
> > > -- 
> > > Jeff Carter 
> > > "Don't knock masturbation. It's sex with someone I love." 
> > > Annie Hall 
> > > 45 
> > Yep, just found that myself. So, I guess since the tasks get mapped onto underlying os threads, windows has its own ideas and does things like automatic priority promotion and other non-compliant stuff. Too bad, but I guess kind of makes sense because windows does everything possible, most likely, 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'. 
> > 
> > So, works perfectly on linux. Probably would on windows too if I knew how to swap out for a pthreads implementation on windows. 
> > 
> > Thanks!
> Odd that it doesn't require the gnat.adc pragma though. I suppose linux is counting on delay statements or other sync points to swap. For what I need, 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.

  reply	other threads:[~2021-06-13 16:50 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-12 12:51 non-preemptive tasking on GNAT 2020 Windows 10 multicore AMD Dan Winslow
2021-06-12 13:11 ` Dmitry A. Kazakov
2021-06-12 15:43   ` AdaMagica
2021-06-12 15:57     ` Dmitry A. Kazakov
2021-06-12 16:05       ` AdaMagica
2021-06-12 16:30         ` Dmitry A. Kazakov
2021-06-12 20:56           ` Dan Winslow
2021-06-12 22:21             ` Dan Winslow
2021-06-13  1:24               ` Dennis Lee Bieber
2021-06-13  1:55                 ` Dennis Lee Bieber
2021-06-13 10:24               ` J-P. Rosen
2021-06-13 12:11                 ` Dan Winslow
2021-06-13  6:20         ` Randy Brukardt
2021-06-13  8:04           ` darek
2021-06-13  9:13             ` Dmitry A. Kazakov
2021-06-13 21:43               ` darek
2021-06-13 12:06           ` Dan Winslow
2021-06-13 13:16             ` Jeffrey R. Carter
2021-06-13 16:43               ` Dan Winslow
2021-06-13 16:46                 ` Dan Winslow
2021-06-13 16:50                   ` Dan Winslow [this message]
2021-06-13 17:44                   ` Jeffrey R. Carter
2021-06-15  0:41                     ` Dan Winslow
2021-06-16  0:10                       ` Dennis Lee Bieber
2021-06-14  2:09                 ` Dennis Lee Bieber
2021-06-12 16:03     ` AdaMagica
2021-06-12 18:02       ` Niklas Holsti
2021-06-12 20:50         ` Dan Winslow
2021-06-13 17:41         ` AdaMagica
2021-06-12 17:18 ` Dan Winslow
2021-06-12 17:21   ` Dan Winslow
2021-06-12 18:06     ` Dennis Lee Bieber
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox