Subject: Re: NetBSD1.6 UVM problem?
To: Matthew Mondor <mmondor@gobot.ca>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 12/10/2002 10:57:44
On Tue, 10 Dec 2002, Matthew Mondor wrote:

> Wouldn't hacks like AIX's and this one require most applications that need
> to be safe to become unportable, platform dependant? Unless we add transparent
> support for these facilities in libc? In which case all applications could
> have the same execution safety but this wouldn't be suitable for any
> emulation imho.

Two things:

1) Since most OSs handle memory shortage differently, how you deal with it
is platform (OS) dependant. We are already there. :-)

2) If we do the same thing AIX did, then programs start to have an API to
work with. :-)

> I personally think that it's a kernel-level only thing, and that although it
> may take some time, a solution to kill the most demanding processes rather
> than a random one would be best... Applications aware about safety would
> make sure to not exceed a reasonable size... For instance, internet server
> daemons usually respect the limits as specified by the administrator on
> the number of simultaneous clients it should serve, etc; and would generally
> not fall in the category of a process automatically killed for causing
> out of swap conditions...

Define "reasonable" size? People have had the idea of killing "too big" a
server before, and have tried it. They didn't like the result.

How would you implement this policy?

Also, if I'm running low on memory, the processes *I* want killed are
probably the smaller ones. While they give less bang per kill, they are
worth "less" to me than the big ones (like say my X server :-)

Take care,

Bill