Re: Some questions about linux kernel.

From: George (greerga@nidhogg.ham.muohio.edu)
Date: Tue Mar 21 2000 - 07:54:47 EST


On Mon, 20 Mar 2000, David Whysong wrote:

>On Mon, 20 Mar 2000, Richard B. Johnson wrote:
>
>>The place where all of the system information is known is in "user
>>space". The kernel readily "knows" stuff about the current process, but
>>retrieving information about other tasks in a page-fault handler would
>>result in an extremely poor performing machine. A user-space daemon can
>>acquire information about all the tasks, can detect runaway tasks, can
>>safeguard special tasks like Web Servers that haven't gone crazy, and
>>can watch for performance hurting rogue programs.
>>
>>Such a program, if properly designed, is the solution to such
>>out-of-memory conditions.
>
>No! Or perhaps it depends on what you want this user-space daemon to do.

Probably mlockall() and then wake up periodically checking for low-memory.
If it gets below a certain threshold, use some magic voodoo heuristics
(loaded from a configuration file likely) and kill something.

>Once you reach the OOM condition, this program can not reliably run. And I
>doubt that a user-space daemon could prevent OOM from happening on a time
>sharing system, since a malicious (or buggy) program could try to use all
>memory during a single timeslice.

While everything else is paging to disk, I would assume the above program
would get lots of time since it's the only thing left that can run. I
haven't tried it, but it would make sense.

-George Greer

-
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/



This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:33 EST