[LITMUS^RT] How to handle the blocked task
shijunjie92
shijunjie92 at gmail.com
Mon Oct 3 16:00:57 CEST 2016
So how can I let a task spinning on the processor when it is waiting for a resource rather than being preempted by a lower priority task?
1. Enqueue that blocked task in the ready queue and pick up the highest priority task as the next scheduled task
2. Let an 'empty' thread occupy the processor in the blocked task's priority to protect the process occupied by lower priority task
Which solution should I take? Could you give me some suggestion?
Best Wishes!
You Sincerely!
SHI Junjie
2016-10-03
shijunjie92
发件人:Björn Brandenburg <bbb at mpi-sws.org>
发送时间:2016-10-03 13:00
主题:Re: [LITMUS^RT] How to handle the blocked task
收件人:"litmus-dev"<litmus-dev at lists.litmus-rt.org>
抄送:
> On 02 Oct 2016, at 18:44, shijunjie92 <shijunjie92 at gmail.com> wrote:
>
> I have noticed that, in the pfp_schedule(), only if the prev task is !block, it can be requeued.
> So what happen if the prev_task is blocked? which queue it blongs to?
>
None. It suspends, so the scheduler doesn’t keep track of it any longer. A blocked task is most likely on some wait queue, but not necessarily so (see SIGSTOP). But that is not the scheduler’s concern.
- Björn
_______________________________________________
litmus-dev mailing list
litmus-dev at lists.litmus-rt.org
https://lists.litmus-rt.org/listinfo/litmus-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20161003/27013484/attachment.html>
More information about the litmus-dev
mailing list