Re: A true story of a crash.

Rik van Riel (H.H.vanRiel@phys.uu.nl)
Sun, 16 Aug 1998 19:09:15 +0200 (CEST)


On Sun, 16 Aug 1998, Stephen M. Benoit wrote:

> Am I missing the point? I was under the impression that there is a
> well-defined behavior when a Un*x reaches memory resource limits.
> Additional requests for resources are simply denied: currently
> executing processes don't get axed until they segfault, get signalled
> or exit().
>
> How does the population in user space grow? Only a handful of ways
> I can think of:
> - malloc(3), realloc, etc.
> - fork(2)
> - execve(2)
> - ...

- COW shared page being written to
- COW zero page being written to
- the kernel needs more memory (network, nfs, etc)

> Each one will fail if there is insufficient virtual memory, so each
> application is responsible for detecting NULL from malloc(), -1 from
> fork(), and so on, giving it a chance to do other work or exit().

If there's no more memory, nobody will have much of a chance to
do anything. Usually it's kswapd taking up all the CPU time
desparately trying to free something.

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