Messages in this thread | | | Date | Tue, 14 Mar 2000 19:50:21 -0500 | From | "DeRobertis" <> | Subject | Re: Some questions about linux kernel. |
| |
At 4:20 PM -0400 on 3/13/00, Horst von Brand wrote: >"DeRobertis" <derobert@erols.com> said: > >[...] > >> I'll bring back up memory priorities here... they would solve this. >> They're exactly what you're asking for. And someday hopefully I'll have >> the time to write the code :) > >Sorry to rain on the parade... but we are talking about absolutely >exceptional situations here (OOM), and nobody will sit down and tweak >"memory priorities" for the tasks that might be running when OOM, and even >less come up with a sensible set of priorities the first round.
Some of us will. And (reasonably) sensible ones can be by default:
init, syslogd, very important stuff -20 root logins -15 certain important commands when run as -10 root (e.g., kill, ps, top) demons -5 user-level 0 user cron & at jobs 5
The memory priorities could also be extended to general resource priorities, such as process limits. With the examples above, assume some group of rogue users are running ridiculously large programs which span like crazy. If root tries to log in, there will be no resources to do so. To free some up, the kernel would start killing first user cron & at jobs, then general user-level jobs, then demons. It'd stop when possible.
One important thing to note is that ther kernel would not have these defaults built in -- they would be taken by processes in the normal manner; root processes only can decrease their priority numbers while any process can increase its priority number.
I'll write the code as soon as I get the chance, and I guess we'll see if it's worth it in the traditional open-source way :)
[BTW: I've cc'd this to Adam <adam@eax.com> because it should explain what I mean by process priorities].
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |