comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Scheduling behaviour issue
Date: Wed, 22 Apr 2020 21:21:20 +0300
Date: 2020-04-22T21:21:20+03:00	[thread overview]
Message-ID: <hgbg90FcjcnU1@mid.individual.net> (raw)
In-Reply-To: <bf0fbfa9-b1b7-4fca-bae5-06d451e1817f@googlegroups.com>

On 2020-04-22 21:05, Anh Vo wrote:
> 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.

Sure it will run, after other tasks at this priority terminate or block.

> Is it a undesired situation.

Only if you desire round-robin execution of tasks with the same priority.

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
       .      @       .

  reply	other threads:[~2020-04-22 18:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-22 11:34 Scheduling behaviour issue Simon Wright
2020-04-22 16:16 ` fabien.chouteau
2020-04-22 17:20   ` Simon Wright
2020-04-22 18:05     ` Anh Vo
2020-04-22 18:21       ` Niklas Holsti [this message]
2020-04-22 18:03 ` Niklas Holsti
2020-04-22 20:41   ` AdaMagica
2020-04-22 21:58     ` Niklas Holsti
2020-04-23  0:47       ` Jere
2020-04-23 10:56   ` Simon Wright
2020-04-23 12:38     ` Niklas Holsti
2020-04-23 12:57     ` Niklas Holsti
2020-04-23 11:48 ` Simon Wright
2020-04-23 13:18 ` Niklas Holsti
replies disabled

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