Date: Thu, 20 Jul 2000 07:43:38 -0500 From: "Richard Seaman, Jr." <dick@tar.com> To: Bjorn Tornqvist <bjorn@tornqvist.net> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: SCHED_RR(root only!?) vs SCHED_FIFO(any user!?) Message-ID: <20000720074338.A404@tar.com> In-Reply-To: <3976B539.77FB6626@tornqvist.net>; from bjorn@tornqvist.net on Thu, Jul 20, 2000 at 10:15:53AM %2B0200 References: <3976B539.77FB6626@tornqvist.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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: dick@tar.com 5182 N. Maple Lane phone: 262-367-5450 Nashotah WI 53058 fax: 262-367-5852 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000720074338.A404>