From: David Fox (fox@cs.nyu.edu)
Date: 01/23/93


From: fox@cs.nyu.edu (David Fox)
Subject: Re: Freeze up on X
Date: Sat, 23 Jan 1993 13:38:23 GMT

I think this failure mode is inherant in the decision to allow
allocation of more memory than your combined ram+swap, which I
asked about in my recent message "how does it malloc so much?"
The real allocation occurs when the allocated pages are written
to, and there is no equivalent to malloc returning NULL when
there is insufficient memory to allocate a page. As many have
noted, there is a lengthy, perhaps indefinite, period of
thrashing followed hopefully by the kernal selecting a process
and killing it.

I agree that Linux' swap policy is less profligate with resources
than BSDs, where every allocated page always has a physical analog
in swap space. Perhaps a victim process should be selected sooner,
when, say, 30k of swap remains rather than 0?

-david