* question on 2.4 scheduler, threads, and priority inversion
@ 2005-04-19 16:46 Chris Friesen
0 siblings, 0 replies; 3+ messages in thread
From: Chris Friesen @ 2005-04-19 16:46 UTC (permalink / raw)
To: linux-kernel
I seem to be having an issue with 2.4 and linuxthreads.
I have a program that spawns a child thread, and that child boosts
itself into a realtime scheduler class.
The child then went crazy and turned into a cpu hog. At this point, a
higher-priority task detected the hog, and tried to kill the process by
sending a "kill -9" to the main thread. Unfortunately, it appears that
there is some kind of priority-inversion thing happening, as the process
did not die.
Is this expected behaviour? Is there any way around this? Do I need to
put the main thread at a higher priority than any of the child threads?
What about the manager thread?
Thanks,
Chris
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: question on 2.4 scheduler, threads, and priority inversion
[not found] <3V45v-tx-39@gated-at.bofh.it>
@ 2005-04-19 23:30 ` Robert Hancock
2005-04-19 23:38 ` Chris Friesen
0 siblings, 1 reply; 3+ messages in thread
From: Robert Hancock @ 2005-04-19 23:30 UTC (permalink / raw)
To: linux-kernel
Chris Friesen wrote:
> I seem to be having an issue with 2.4 and linuxthreads.
>
> I have a program that spawns a child thread, and that child boosts
> itself into a realtime scheduler class.
>
> The child then went crazy and turned into a cpu hog. At this point, a
> higher-priority task detected the hog, and tried to kill the process by
> sending a "kill -9" to the main thread. Unfortunately, it appears that
> there is some kind of priority-inversion thing happening, as the process
> did not die.
>
> Is this expected behaviour? Is there any way around this? Do I need to
> put the main thread at a higher priority than any of the child threads?
> What about the manager thread?
>
> Thanks,
>
> Chris
I believe that in the old LinuxThreads implementation the manager thread
is the one that handles all signals, so it may need its priority
increased as well. NPTL threads likely handle this much better (there is
no manager thread).
--
Robert Hancock Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: question on 2.4 scheduler, threads, and priority inversion
2005-04-19 23:30 ` question on 2.4 scheduler, threads, and priority inversion Robert Hancock
@ 2005-04-19 23:38 ` Chris Friesen
0 siblings, 0 replies; 3+ messages in thread
From: Chris Friesen @ 2005-04-19 23:38 UTC (permalink / raw)
To: Robert Hancock; +Cc: linux-kernel
Robert Hancock wrote:
> I believe that in the old LinuxThreads implementation the manager thread
> is the one that handles all signals, so it may need its priority
> increased as well. NPTL threads likely handle this much better (there is
> no manager thread).
Some experimenting leads me to believe that both the main thread and the
manager thread must be of higher priority than the cpu hogging thread,
otherwise priority inversion issues occur.
I was fairly shocked that even a "kill -9" failed to work though...
Chris
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-04-19 23:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <3V45v-tx-39@gated-at.bofh.it>
2005-04-19 23:30 ` question on 2.4 scheduler, threads, and priority inversion Robert Hancock
2005-04-19 23:38 ` Chris Friesen
2005-04-19 16:46 Chris Friesen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).