thread and ksegrp priorities

Murty, Ravi ravi.murty at intel.com
Mon Apr 21 16:24:46 UTC 2008


Hello All,

 

I am working on the 6.2 FreeBSD code base and has a couple of simple
questions. The thread structure defines two priority fields
"td_base_pri" and "td_priority" while a ksegrp defines "kg_user_pri" and
"kg_pri_class". 

 

1.	Since a ksegrp can have multiple "process scope" threads, how is
kg_user_pri used and how is it related to td_base_pri and td_priority?
2.	What is the difference between td_base_pri and td_priority?
3.	If kg_user_pri changes, does it mean that the priority of all
threads that are part of the ksegrp change?

 

It appears that these things change when a thread returns to user mode
(returns to normal user priority), when returning from a sleep (priority
boost) etc.

 

Thanks
Ravi

 



More information about the freebsd-hackers mailing list