Archived

This topic is now archived and is closed to further replies.

Shannon Barber

Changing thread priority on linux

Recommended Posts

C-Junkie    1099
should be able to with pthread_setschedparam

but that applies to the process''s own nice value ultimately

and in order to change nice values.... did you try it as root?

Share this post


Link to post
Share on other sites
Fratt    122
quote:
Original post by Magmai Kai Holmlor
Can it be done?

Everything I''ve tried has lead to disappointment - min & max priority both return 0, attempting to change it anyway returns an error using pthread_getschedparam et. al.


You need to know that only RT scheduling could augmentate its priority. Otherwise you could only "slow" it down or it will fail or crash.

hope this helps

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
It is possible for processes run as regular users to lower priority. If you want to raise the priority, the process needs to have root priviliges.

Share this post


Link to post
Share on other sites