2002 2003 2004 <2005> 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 | Index | 2002 2003 2004 <2005> 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: priorities |
From: | Marty Kraimer <[email protected]> |
To: | [email protected] |
Date: | Mon, 21 Nov 2005 09:29:25 -0600 |
Jeff Hill wrote:
Pursuing this a bit further, I notice, using epicsThreadShowAll, that theOSI => OSD priority mapping maybe isn't working on POSIX (the OSSPRI columnis always zero)? Again, this is building with USE_POSIX_THREAD_PRIORITY_SCHEDULING = YES.
Two "features" of priority scheduling on linux.1) On linux you must be running as root in order to be able to set SCHED_FIFO. The code is written to silently revert to non-priority scheduling if EPERM is returned. 2) Older versions of linux (perhaps all 2.4 versions without special patches) do not seem to support priority scheduling. The implementations seem to just silently ignore the priority scheduling requests even though _POSIX_THREAD_PRIORITY_SCHEDULING is defined.
This it seems that the only way to know if priority scheduling is being used is to run epicsThreadShowAll and see if the OSS prioritys have non zero values.
Note that solaris shows non-zero values WITHOUT being root. When I run top, I notice that the LWP has higher values than other processes. I do not know how solaris is managing the priorities.
Marty