On Thu, Jul 20, 2000 at 10:15:53AM +0200, Bjorn Tornqvist wrote:
>
> Hi all!
>
> Can anyone please explain why I have to be root (or make the executable
> run as root) to be able to use SCHED_RR in my LinuxThreads (btw, same
> thing happens in pthreads) application?
1) Note that the default scheduling policy in linuxthreads is SCHED_OTHER
not SCHED_FIFO. SCHED_OTHER is a form of round robin scheduling.
2) SCHED_RR and SCHE_FIFO are "real time" policies in linuxthreads.
FreeBSD (and Linux too, AFAIK) limit root to setting real time
policies because setting such a policy can potentially monopolize
a machine, effectively resulting in a local DoS. There may also
be potential priority inversion problems that need to be dealt
with when using real time policies.
3) I would have thought that FreeBSD user threads would let you manipulate
policies as an ordinary user, but in any case, AFAIK the default
policy in user threads is SCHED_RR. AFAIK, SCHED_RR and SCHED_FIFO
are not "real time" policies in FreeBSD user threads (when applied
to thread scheduling -- they are still real time policies when
applied to the scheduling of the process).
> My application *must not* run as root (there is no need for it to) but I
> also *must have* Round-Robin scheduling for overall system (application)
> stability and availability.
Why is the default SCHED_OTHER not acceptable for your app? I would
think stability and availability would be improved with SCHED_OTHER,
except in very restricted situations?
--
Richard Seaman, Jr. email: [EMAIL PROTECTED]
5182 N. Maple Lane phone: 262-367-5450
Nashotah WI 53058 fax: 262-367-5852
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message