[osg-users] OpenThreads, scheduling, etc ... policies

Curtis Rubel crubel at compro.net
Wed May 6 09:37:15 PDT 2015


Robert,

Attached is a copy of the PThread.cpp file from OSG 3.3.7 that I modified that allows Linux systems to take full advantage of the pthread scheduling parameters.  The changes I made are all within the 
#ifdef ALLOW_PRIORITY_SCHEDULING

define and the static int SetThreadSchedulingParams(Thread *thread)
function.

Feel free to pass this around to anyone that would like to review. comment and/or test the changes when time permits.  I am not
trying to rush anything, just figured I would go ahead and send
you what I am referring too, so it will be handy when time permits
you/(or your group) to take a look at it.

I am currently running with this change here and all our old existing OSG applications still are running OK as well as are my new test applications that take advantage of the changes.

One thing to note is that on at least my Linux system here, unless the user is running with root privileges or their application as been changed to run with root privileges the Linux kernel does not allow the application to run at anything other than the default policy of SCHEDULE_OTHER and priority 0(zero), no matter what they attempt to set.  This is another protection that seems to be in place to protect someone from accidentally causing a system problem.

Anything else that I can do to assist in getting this change implemented at some point, please let me know.

....

Thank you for your time and consideration in this matter.

Cheers,
Curtis

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63650#63650



-------------- next part --------------
A non-text attachment was scrubbed...
Name: PThread.cpp
Type: text/x-c++src
Size: 26266 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150506/74cd8814/attachment-0003.cpp>


More information about the osg-users mailing list