Subj : Re: How to change thread priority without being root To : comp.programming.threads From : David Butenhof Date : Thu Aug 04 2005 12:51 pm yccheok@gmail.com wrote: > For priority, may I know bigger number means higher priority or smaller > number means higher priority? In POSIX realtime (SCHED_RR, SCHED_FIFO, SCHED_SPORADIC), numerically greater priority values have precedence over lower numeric values. In traditional UNIX (nice) scheduling, it's the other way around, and the numeric ranges usually differ as well. So while you're safe if you stick entirely to portable POSIX functions and data and use the sched_getpriority_min/sched_getpriority_max functions correctly, if you MIX any POSIX and non-POSIX data or functions, or make assumptions, you can easily get yourself (and your code) confused. -- Dave Butenhof, David.Butenhof@hp.com HP Utility Pricing software, POSIX thread consultant Manageability Solutions Lab (MSL), Hewlett-Packard Company 110 Spit Brook Road, ZK2/3-Q18, Nashua, NH 03062 .