Hello!
I need to know what are the threads running on my system and their
priorities.
For that purpose, I use the ‘ps’ command :
ps -o comm,nice
In fact, the ‘nice’ option gives me what is called ‘process priority’.
I would like to know if ‘process priority’ stands for ‘main thread’s
priority of the process’ or ‘the highest thread’s priority of the process’ ?
If this is not the ‘highest thread’s priority of the process’, how can I do
to obtain it?
Thanks
Vincent.
Vincent a écrit :
Hello!
I need to know what are the threads running on my system and their
priorities.
For that purpose, I use the ‘ps’ command :
ps -o comm,nice
In fact, the ‘nice’ option gives me what is called ‘process priority’.
I would like to know if ‘process priority’ stands for ‘main thread’s
priority of the process’ or ‘the highest thread’s priority of the process’ ?
If this is not the ‘highest thread’s priority of the process’, how can I do
to obtain it?
Thanks
Vincent.
It stands for the main thread, usaully the main() function. This function
inherit the shell priority, in fact the priority of the process which have
started it, and keep it if you don’t decide to do differently.
Each other thread in the same process could have a different priority and
scheduling policy.
Alain.