On Sun, 12 Oct 2003, Christian Weisgerber wrote: > Is it safe nowadays to run a process at idle priority? Or is there > still the danger of priority inversion / a deadlock? Priority propagation should prevent problems in theory. I use idprio a lot for 1 long-running user process (and its children) and haven't noticed any related problems. Also, some kernel processes (pagezero at least) run at idle priority. pagezero seems to get scheduled right, but it gives up control a lot so it is unlikely to cause deadlock. > On FreeBSD 4.x you can run a process, such as setiathome, at nice > level 19 and it will (almost) only ever get CPU time when no process > of normal priority competes with it. FreeBSD 5.x is much "fairer" > in this respect, which has the unpleasant result that such a > background process will noticeably compete for CPU now. FreeBSD 5.x is plain broken in this respect, at least with the 4BSD scheduler. The breakage started in rev.1.103 of proc.h and associated changes. These essentially gave the same dynamic range for nice values between -20 and 20 as 4.x has for nice values between 0 and 20. But there already wasn't quite enough dynamic range (except the range was made infinite by giving levels 19-20 too little CPU). Then the dynamic range was further reduced in rev.1.1 of priority.h and associated changes. This is "fixed" in my version essentially by dynamically scaling the mapping of niceness to priority. But I normally use idprio and not nice for low priority processes. BruceReceived on Sat Oct 11 2003 - 17:26:56 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:25 UTC