Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - sched_priority and priority inheritance: (3 Items)
   
sched_priority and priority inheritance  
Here's an excerpt from the docs for the sched_param structure that is returned when you attempt to find your priority 
using the pthread_getschedparam() call:

sched_priority
    When you get the scheduling parameters, this member reflects the priority that was assigned to the thread or process
. It doesn't reflect any temporary adjustments due to priority inheritance.

If you examine a server thread after it has received a message, you'll see that this member *does* change to match the 
client prio.  Why is this?  It seems to contradict the docs, and well as to be counter-intuitive.  I would have guessed 
that this member should stay the same, and the sched_curpriority member should change.

--Chris 
Re: sched_priority and priority inheritance  
Actually there are many places in netrino when we change real priority allong with curpriority

-receving  pulse (line 137 of nano_pulse.c) 
-when all threads in a process are running and there's noone to receive a pulse. (line 176 in nano_pulse) 
- six different places in ker_fastmsg 

looks to me the docs are wrong.

Re: sched_priority and priority inheritance  
Thanks for the reply Attila.

If this is the case, what is the point of having two members for priority?  I thought the idea was one would represent 
base prio and the other would represent current prio as it is changed by these various things?

I guess I ought to try and find the POSIX spec on this?  Maybe the explanation is there.