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
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 [email protected]
Home Page: http://www.roberthancock.com/
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