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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:ae9:d847:: with SMTP id u68mr27459225qkf.322.1587578738063; Wed, 22 Apr 2020 11:05:38 -0700 (PDT) X-Received: by 2002:a9d:77d5:: with SMTP id w21mr242073otl.5.1587578737327; Wed, 22 Apr 2020 11:05:37 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 22 Apr 2020 11:05:37 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=149.32.224.35; posting-account=Qh2kiQoAAADpCLlhT_KTYoGO8dU3n4I6 NNTP-Posting-Host: 149.32.224.35 References: <3a224dbe-5af4-4f8a-84d5-03e8b56398fa@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Scheduling behaviour issue From: Anh Vo Injection-Date: Wed, 22 Apr 2020 18:05:38 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:58465 Date: 2020-04-22T11:05:37-07:00 List-Id: On Wednesday, April 22, 2020 at 10:20:27 AM UTC-7, Simon Wright wrote: > 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. If the preempted task was resumed again, then task B will have no chance to run. Is it a undesired situation.