O(1) Entitlement Based Scheduler
Quoted 6 lines · Peter Williams
Quoted 4 lines
Quoted 1 line
They already do e.g. renice is such a program.
No one's talking about LOWERING priority here. You can only DoS someone else if you can set negative nice values, and non-root can't do that.
Which is why root has to be in control of the mechanism.
It seems to me that much of this could be solved if the user *were* allowed to lower nice values (down to 0).
Right now the only way I can prioritize between my own processes by starting important/timing sensitive programs normally and everything else reniced. The problem is that the first category consists of one or two programs while the second category is, well, "everything else".
I would *love* to be able to start the window manager and all children at +10 and be able to adjust priorities, from 0 (important user-level) to 10 (normal) to 20. Negative values could still be root-only.
So why shouldn't this be possible? Because a greedy user in a multi-user system would just run everything at max prio thus defeating the purpose? Sure, that would be annoying but it would have another solution ie. an entitlement based scheduler or something.
(and isn't it this simple?)
kernel/sys.c 2004-02-29 12:59:20.000000000 +0100 renamed from kernel/sys.c.orig 2004-02-29 12:58:45.000000000 +0100 +1 -1
@@ -276,7 +276,7 @@ error = -EPERM; goto out; } - if (niceval < task_nice(p) && !capable(CAP_SYS_NICE)) { + if (niceval < 0 && !capable(CAP_SYS_NICE)) { error = -EACCES; goto out; }
Regards,
Joachim B Haga
Seems like we are trying to manage something worth managing, which is how much of a systems CPU capacity is consumed by all of a given users tasks over periods of minutes, by micromanaging the scheduling of individual tasks over periods of ticks.
We don't manage disk space by telling someone no file bigger than 1 megabyte. Rather they get an upper limit on all their files combined. If they want to spend most of that on one file, that's fine.
Is there anyway to provide a mechanism that would support administering a system as follows:
1) Users get so much CPU usage allowed, determined by an upper limit on a running average of the combined CPU usage of all their tasks, with a half life perhaps on the order of minutes.
2) They can nice their tasks up and down, within a decent range, as they will.
3) But if they push too close to their allowed limit, all their tasks get reined in. The relative priorities within their own tasks are not changed, but the priority of their tasks relative to other users is weakened.
Signature · 3 lines
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.650.933.1373Quoted 20 lines · Joachim B Haga
Quoted 7 lines · Peter Williams
Quoted 5 lines
Quoted 1 line
They already do e.g. renice is such a program.
No one's talking about LOWERING priority here. You can only DoS someone else if you can set negative nice values, and non-root can't do that.
Which is why root has to be in control of the mechanism.
It seems to me that much of this could be solved if the user *were* allowed to lower nice values (down to 0).
Right now the only way I can prioritize between my own processes by starting important/timing sensitive programs normally and everything else reniced. The problem is that the first category consists of one or two programs while the second category is, well, "everything else".
Quoted 8 lines
I would *love* to be able to start the window manager and all children at +10 and be able to adjust priorities, from 0 (important user-level) to 10 (normal) to 20. Negative values could still be root-only.
So why shouldn't this be possible? Because a greedy user in a multi-user system would just run everything at max prio thus defeating the purpose? Sure, that would be annoying but it would have another solution ie. an entitlement based scheduler or something.
More importantly it would allow ordinary users to override root's settings e.g. if (for whatever reason) the sysadmin decided to renice a task to 19 (say) this modification would allow the owner of the task to renice it back to zero. This is the reason that it isn't be allowed.
Peter
Signature · 4 lines
Dr Peter Williams, Chief Scientist [email protected] Aurema Pty Limited Tel:+61 2 9698 2322 PO Box 305, Strawberry Hills NSW 2012, Australia Fax:+61 2 9699 9174 79 Myrtle Street, Chippendale NSW 2008, Australia http://www.aurema.com