Thread (4 messages) 4 messages, 3 authors, 2012-12-10

Asking another process sleep from another process or interrupt context

From: SandeepKsinha <hidden>
Date: 2012-12-01 04:50:00

Hey Sunil,

Hope you are doing good.


On Sat, Dec 1, 2012 at 6:12 AM, Sunil Agham [off-list ref] wrote:
Hello List,

This is what I am trying to do in linux kernel. When some event occurs;
Process X wants to tell process Y to un-schedule itself(Y) [ and change
state from "running or ready to run" to "not ready to run until told
otherwise" ]. Process X will take care of waking up Y later.

One approach probably is to set "*need_resched*" for process Y so that
schedular picks another process at the first opportunity. Is there any
other alternative ? Is it safe to do this from interrupt context instead of
process X's context ?
Interrupt context is a better alternative. Make changes around the code
which picks up the next process for execution. The waking up would be taken
care automatically in that case.

Also, this approach would be least disruptive if compared with the other
alternative you listed out.

Mulyadi,
Any help?


--
Sunil

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

-- 
Regards,
Sandeep.






?To learn is to change. Education is a process that changes the learner.?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20121201/78327268/attachment.html 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help