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

Asking another process sleep from another process or interrupt context

From: Sunil Agham <hidden>
Date: 2012-12-10 01:06:16

Yah, Thanks for the help Mulyadi and Sandeep.

--
Sunil


On Sat, Dec 1, 2012 at 10:35 AM, Mulyadi Santosa
[off-list ref]wrote:
Hi Sandeep....

On Sat, Dec 1, 2012 at 11:50 AM, SandeepKsinha [off-list ref]
wrote:
quoted
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
quoted
care automatically in that case.

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

Mulyadi,
Any help?
Since you "summon", then I have no other choice :)

OK, I need to be careful here. If I may to clear up the things, there
are two objectives here:

1. To unschedule other process....

Alright,I think the simplest one is setting need_resched to true or 1
(as you guys already found out). That's not the fastest way, but I am
sure the most straight forward way.

2. To block the process until it is allowed to run...

Sounds like mimic-ing SIGSTOP handler to me......

So I guess, to do the entire thing simplest way, is by sending SIGSTOP.
Agree?


--
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20121209/17809322/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