pthread_setschedparam requiring root permission (was Re: Does POSIX standard say EXPLICIT or IMPLICIT SCHED)

Till Straumann strauman at SLAC.Stanford.EDU
Wed Dec 4 18:58:53 UTC 2002


Joel Sherrill wrote:
> 
> Ralf Corsepius wrote:
> 

-- snip --

> 
> 
>>* Some schedulers require special permission (eg. root) or system
>>settings on some systems.
> 
> 
> Linux for one is in this category. 

Which makes sense. On a general purpose OS you certainly don't want
to give users the permission to 'steal' the CPU (the first thread to
run at maximal priority / SCHED_FIFO has it all)

> I have written code to ignore 
> the EPERM/EINVAL errors from Linux if you try to do a
> pthread_setschedparam

what do you mean by "ignoring" these errors - I guess you still
don't get the requested scheduling policy/priority if you're not root?

-- Till

> for SCHED_RR.  It is the same for SCHED_FIFO.
> 
> 
>>...
>>
>>Ralf
> 
> 






More information about the users mailing list