real priority and effective priority...

Hi,

Any thread have two priorities - real priority and effective priority
under Neutrino,it doesn’t indicate what is the difference between these two
priorities in the ‘system architecture’ document, it just interpreted the
function of effective priority clearly.
Now,my question is what’s the effects of real priority.

Any suggestion or comments will be great appreciated.


Hichun Chen

If I had to guess…

Real Priority - The base priority the thread was set to (ie.
pthread_setschedparam())

Effective Priority - The “real” priority of the thread when you take
temporary effects such as priority inheritance and (if we had one)
adaptive scheduling into account.

Daryl Low

Hichun Chen wrote:

Hi,

Any thread have two priorities - real priority and effective priority
under Neutrino,it doesn’t indicate what is the difference between these two
priorities in the ‘system architecture’ document, it just interpreted the
function of effective priority clearly.
Now,my question is what’s the effects of real priority.

Any suggestion or comments will be great appreciated.


Hichun Chen

Daryl Low <dlo*w@qnx.com> wrote:

If I had to guess…

Real Priority - The base priority the thread was set to (ie.
pthread_setschedparam())

Effective Priority - The “real” priority of the thread when you take
temporary effects such as priority inheritance and (if we had one)
adaptive scheduling into account.

I think it is:

real priority – threads priority from setsched, setprio(), message
passing inheritance, pulse prio inheritance, etc

effective priority – usually same as real, but can be higher due to
mutex contention

effective is what will be used for scheduling purposes. effective
will never (in my understanding) drop below real, but may be higher
(due to mutex contention).

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

real priority – threads priority from setsched, setprio(), message
passing inheritance, pulse prio inheritance, etc

effective priority – usually same as real, but can be higher due to
mutex contention

effective is what will be used for scheduling purposes. effective
will never (in my understanding) drop below real, but may be higher
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in case of priority

invertion,for example, assumed a Server threads’ RP=10,and EP=10 at this
moment.A Client thread (prio=5) want to connect to that Server,so the
Server’s EP has to equal to 5 for avoiding priority invertion.
Why do you think EP will never drop below RP??

(due to mutex contention).


-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in case of priority
invertion,for example, assumed a Server threads’ RP=10,and EP=10 at this
moment.A Client thread (prio=5) want to connect to that Server,so the
Server’s EP has to equal to 5 for avoiding priority invertion.
Why do you think EP will never drop below RP??

When a client does a Send to a server (who is receive blocked), the real and
effective priority of the server is dropped, so technically the effective
isn’t lower than the real.

-Adam