<div dir="ltr">Any further comments are appreciated.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 18 March 2016 at 15:59, Darshit Shah <span dir="ltr"><<a href="mailto:darnir@gmail.com" target="_blank">darnir@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On 18 March 2016 at 14:48, Sebastian Huber <span dir="ltr"><<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><br>
<br>
On 18/03/16 14:38, Darshit Shah wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> "schedulable task sets would miss their deadlines since it does not consider<br>
> migrating high priority tasks"<br>
><br>
> I think this is not correct. The current APA scheduler should implement<br>
> strong APA. However, it may iterate several times over all (!) ready tasks.<br>
> This is the actual problem.<br>
><br>
I may be wrong, but I think the current implementation does indeed not consider strong APA guarantees.<br>
<br>
The `_Scheduler_priority_affinity_SMP_Get_lowest_scheduled` method tries to find a thread that needs to be migrated to another core in order to schedule the selected thread. In this method, on line 274 is the comment:<br>
<br>
      /*<br>
         * If we didn't find a thread which is of equal or lower<br>
    importance<br>
         * than filter thread is, then we can't schedule the filter thread<br>
         * to execute.<br>
         */<br>
<br>
<br>
If I understand this comment correctly, the scheduler does not consider threads for migration if they are not of "equal or lower importance" than the filter thread.<br>
</blockquote>
<br></span>
In contrast to the Linux push/pull scheduler you search here in the set of all scheduled/ready threads and not just in your local queue. I didn't look into the details, but I think this is enough for strong APA. See also _Scheduler_priority_affinity_SMP_Check_for_migrations().<div><div><br></div></div></blockquote><div><br></div></span><div>That is true. Unlike the linux scheduler, all currently scheduled threads are considered for migration, but then it seems we only decide to migrate a thread if its priority is lower than the thread being dispatched. In case I'm wrong then the current implementation is indeed Strong APA, just with a bad time complexity. Else, we still have some form of a weak APA constrain in the scheduler.<br></div><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
<br>
-- <br>
Sebastian Huber, embedded brains GmbH<br>
<br>
Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>
Phone   : <a href="tel:%2B49%2089%20189%2047%2041-16" value="+4989189474116" target="_blank">+49 89 189 47 41-16</a><br>
Fax     : <a href="tel:%2B49%2089%20189%2047%2041-09" value="+4989189474109" target="_blank">+49 89 189 47 41-09</a><br>
E-Mail  : <a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a><br>
PGP     : Public key available on request.<br>
<br>
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
<br>
</div></div></blockquote></span></div><br><br clear="all"><span class=""><br>-- <br><div>Thanking You,<br>Darshit Shah<br><br></div>
</span></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Thanking You,<br>Darshit Shah<br><br></div>
</div>