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=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!xmission!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 12 Jun 2021 20:24:58 -0500 From: Dennis Lee Bieber Newsgroups: comp.lang.ada Subject: Re: non-preemptive tasking on GNAT 2020 Windows 10 multicore AMD Date: Sat, 12 Jun 2021 21:24:58 -0400 Organization: IISS Elusive Unicorn Message-ID: References: <1d798609-8b73-4bc6-b74f-e435e8af8fedn@googlegroups.com> <3b70ea2b-9783-48a3-999c-55486126ec9dn@googlegroups.com> User-Agent: ForteAgent/8.00.32.1272 X-No-Archive: YES MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-M4txFdl+y3ZanBqRx5YUfmqClvDXbWH2qOWOIU9Flxc+CY8KVDA9UzEhz0W/EdqO2jr3ZT8bng7w0yg!QdoM/7dIjvmGYhzCEeGli7R9hKpz1nNUg7pPPIXDDZAQYJAOkcOUAo2So7hMOC+3wZPRrRsP X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2746 Xref: reader02.eternal-september.org comp.lang.ada:62208 List-Id: On Sat, 12 Jun 2021 15:21:35 -0700 (PDT), Dan Winslow declaimed the following: >Kind of disheartening, and I'm not sure where to go next. I don't so much require a non-preemptive scheduler, but my inability to affect any behavior at all for teh tasking is really wierd, and seems like a bug of the underlying system. Anyone have any ideas? Is there some fundamental flaw in my little test program I'm missing? I suspect part of the problem may be that the GNAT runtime defers to the OS for how tasks (threads/processes) are implemented (AdaCore probably gets a fortune for configuring a bare-bones runtime that supports tasking). Since Windows will have a lot of time-slicing and interrupts, ANY task/thread is subject to preemption -- and on preemption, it likely goes to the end of any round-robin within priorities queue. https://www.microsoftpressstore.com/articles/article.aspx?p=2233328&seqNum=7 {Interesting -- about half-way down that page it states that a preempted thread is put on the /head/ of the queue for its priority level, so that it can later be restarted to "finish" its time quantum} -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/