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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED.DFxaDADwSkn+6wW9Ah21PA.user.gioia.aioe.org!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Scheduling behaviour issue Date: Wed, 22 Apr 2020 18:20:22 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <3a224dbe-5af4-4f8a-84d5-03e8b56398fa@googlegroups.com> NNTP-Posting-Host: DFxaDADwSkn+6wW9Ah21PA.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (darwin) X-Notice: Filtered by postfilter v. 0.9.2 Cancel-Lock: sha1:VpQ7HygMWPJZoFONrJpsZW1PYo8= Xref: reader01.eternal-september.org comp.lang.ada:58462 Date: 2020-04-22T18:20:22+01:00 List-Id: fabien.chouteau@gmail.com writes: > On Wednesday, April 22, 2020 at 1:34:53 PM UTC+2, Simon Wright wrote: >> but FreeRTOS adds the preempted task at the *tail* of its ready queue >> ([4], section Prioritized Pre-emptive Scheduling (without Time Slicing), >> on page 95 or thereabouts). > > I couldn't find the paragraph that says that. It's the dicussion after Figure 29. There are 2 "continuous" tasks (no interaction with the scheduler) of the same priority, say A & B (this is so unlike any real-time system I've encountered! You might have just one, doing some sort of housekeeping or monitoring). Both A and B are ready. One of the tasks, A, runs until a higher-priority task C preempts it; when the higher-priority task finishes, *the other task* B runs! > That seems very strange to not resume the task that was just > preempted. I so agree. I think it's because the mechanism used is derived from FreeRTOS's round-robin scheduler.