From owner-freebsd-hackers Wed Apr 29 10:45:08 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA21921 for freebsd-hackers-outgoing; Wed, 29 Apr 1998 10:45:08 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from phoenix.its.rpi.edu (dec@phoenix.its.rpi.edu [128.113.161.45]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA21857 for ; Wed, 29 Apr 1998 10:44:47 -0700 (PDT) (envelope-from dec@phoenix.its.rpi.edu) Received: from localhost (dec@localhost) by phoenix.its.rpi.edu (8.8.8/8.8.7) with SMTP id NAA06321; Wed, 29 Apr 1998 13:44:31 -0400 (EDT) (envelope-from dec@phoenix.its.rpi.edu) Date: Wed, 29 Apr 1998 13:44:30 -0400 (EDT) From: "David E. Cross" To: David Wolfskill cc: freebsd-hackers@FreeBSD.ORG Subject: Re: SIGDANGER In-Reply-To: <199804291637.JAA09220@pau-amma.whistle.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 29 Apr 1998, David Wolfskill wrote: > >Date: Wed, 29 Apr 1998 09:16:51 -0400 (EDT) > >From: "David E. Cross" > > >the Kernel would then treat processes as follows: > >1) Processes that did not have SIGDANGER handled would be the first to be > >killed (just sent a SIGKILL). > > I'm probably exposing my ignorance here, but it seems to me that SIGKILL > really ought to be a last resort.... Since it can't be caught, it > provides absolutely no way for such a process to do any cleanup at all. When you get that critically low on memory you really don't have the luxury of warning a process that it is about to die, and waiting for the process to clean up, the 'warning' of processes should occur at some threshold of available memory, when you get to the point of *needing* to kill procs, then you should just kill them and be done with it ;) > > On a related note, I'm wondering if memory allocation is the only > resource to which this sort of strategy ought to apply: I don't think > of any that are as critical, just now, but I'm not entirely convinced > that the list (of resources) should contain only a single entry.... I think that is why AIX refers to it as SIGDANGER, it could be used for other cases where resources are critically low... file descriptors perhaps (just rambling, don't flame me). Seeing how this has caused quite a stir, why don't I take a crack at implimenting it (that is a subtle hint for the kernel programs to: a: Do it before I do b: run screaming into the night, ban me from -hackers and disavow all knowledge of FreeBSD c: point me at some source. I would prefer c) -- David Cross To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message