[LUNI] Scheduling question in 2.4/2.6
Eugene Teo
eugene.teo at eugeneteo.net
Tue Apr 13 11:18:10 CDT 2004
<quote sender="Michael Knoop">
> At 11:57 PM 4/13/04 +0800, you wrote:
> >assuming setiathome runs as user root?
> >
> >setiathome -nice 19 2&>1 /dev/null works the same, shorter :)
>
> I like the 2&>1 although I thought it was 2>&1. Maybe either works.
>
> I'm not so sure about running this as root, however. It just doesn't seem
> like a good idea to me, and the man page for setiathome suggests running it
> as a user.
ok. i checked man, it is only when you need to renice a value that is
lesser than 0 that you need root privileges. if it is within 0 and
PRIO_MAX(20), it is fine, provided the process is owned by you.
it's 2>&1. typo. my bad.
Eugene
>
> M
> >
> >Eugene
> >
> ><quote sender="Michael Knoop">
> >> renice will alter the priority of a running process.
> >> For setiathome I use this line in my crontab
> >>
> >> 0 * * * * cd /home/mikek/setiathome; setiathome -nice 19 > /dev/null 2>
> >> /dev/null
> >>
> >> It tries to start setiathome every hour. If it is already running nothing
> >> happens, otherwise is starts it with nice level 19 (lowest priority =
> >> highest nice level).
> >>
> >> Mike K
> >>
> >> At 10:19 PM 4/11/04 -0500, you wrote:
> >> >
> >> >Does anyone know of a way to fix the priority (vs. nice
> >> >level) of a process, either from w/in the proc or externally?
> >> >
> >> >One example is Solaris' scheduling table, where the scheduling
> >> >level can be fixed by returning the job to its original sched
> >> >value at the end of a task.
> >> >
> >> >Idea is to take something like setiathome and fix its
> >> >priority at, say, 20. The only way the job will get any
> >> >CPU at all is if there is nothing else runnable -- it
> >> >becomes essentially an idle task.
> >> >
> >> >--
> >> >Steven Lembark 2930 W. Palmer
> >> >Workhorse Computing Chicago, IL 60647
> >> > +1 888 359 3508
> >> >--
> >> >Linux Users Of Northern Illinois - Technical Discussion
> >> >http://luni.org/mailman/listinfo/luni
> >>
> >> --
> >> Linux Users Of Northern Illinois - Technical Discussion
> >> http://luni.org/mailman/listinfo/luni
> >>
> >
> >--
> >Eugene TEO - <eugeneteo%null!cc!uic!edu> <http://www.anomalistic.org/>
> >1024D/14A0DDE5 print D851 4574 E357 469C D308 A01E 7321 A38A 14A0 DDE5
> >main(i) { putchar(182623909 >> (i-1) * 5&31|!!(i<7)<<6) && main(++i); }
> >
> >--
> >Linux Users Of Northern Illinois - Technical Discussion
> >http://luni.org/mailman/listinfo/luni
>
> --
> Linux Users Of Northern Illinois - Technical Discussion
> http://luni.org/mailman/listinfo/luni
>
--
Eugene TEO - <eugeneteo%null!cc!uic!edu> <http://www.anomalistic.org/>
1024D/14A0DDE5 print D851 4574 E357 469C D308 A01E 7321 A38A 14A0 DDE5
main(i) { putchar(182623909 >> (i-1) * 5&31|!!(i<7)<<6) && main(++i); }
More information about the luni
mailing list