Messages in this thread | | | Date | Sat, 15 Aug 1998 10:29:17 +0200 (CEST) | From | Rik van Riel <> | Subject | Re: A true story of a crash. |
| |
On Fri, 14 Aug 1998, Theodore Y. Ts'o wrote:
> After some thought, you consider that fork-bombs are nowhere near as > common on a relatively well-behaived "Personal" system as is running > out of memory. Thus, it makes sense to kill the largest process not > owned by root unless there are no more, then the largest process > > There's only one problem with this strategy --- which was originally > used by AIX, by the way. If the largest process happens to be the X > server, and the reason why you're out of memory was because you have
I have formulated some more rules, which should select the proper process. If the X server sets CAP_RAW_IO (which it really should), my process avoids the X server.
Furthermore, it selects on: - memory size - CPU used (loads of CPU --> hard to do again) - time running (old process --> most likely stable) - euid != uid - euid = 0 - raw I/O capabilities (these processes are never killed) - niced process (low priority)
I have made some calculations, and my killer function seems to make realistic choices...
(I haven't tested it however, but the patch should be out RSN...)
Rik. +-------------------------------------------------------------------+ | Linux memory management tour guide. H.H.vanRiel@phys.uu.nl | | Scouting Vries cubscout leader. http://www.phys.uu.nl/~riel/ | +-------------------------------------------------------------------+
- 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.altern.org/andrebalsa/doc/lkml-faq.html
| |