Why regular user with realtime priority can't run pthread_setschedparam(3) with sched_priority=10 ?

Julian Elischer julian at freebsd.org
Sat Jan 14 16:15:32 UTC 2017


On 9/01/2017 7:26 AM, Yuri wrote:
> The process (jackd) calls this code:
> >        rtparam.sched_priority = priority; // =10
> >        if ((x = pthread_setschedparam (thread, SCHED_FIFO, 
> &rtparam)) != 0) {
>
> It succeeds when the process is run as 'root'.
> It fails when the process is run as a regular user with realtime 
> priority (set with rtprio 0): Operation not permitted
>
> Why realtime priority of the process doesn't make high priority 
> threads possible?
high priority threads have for all of unix history required special 
permissions (e.g. root) as they can negatively inpact other users.
It is assumed htat if you want to do rt work you must have root 
permissions

>
> Yuri
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to 
> "freebsd-hackers-unsubscribe at freebsd.org"
>



More information about the freebsd-hackers mailing list