Re: Re: Out of Memory in v. 2.1

Michael Mess (michael@kawo2.rwth-aachen.de)
Thu, 08 Oct 1998 21:58:23 +0200


>Note that it would be a good idea to *also* have SIGDANGER,
>by default ignored, but a process can register a handler.
>SIGDANGER is broadcast when the danger zone is entered, and
>nice applications will prune their memory pools. (The
>allocation which failed might sleep and automatically retry,
>as well - that's an option.)

We could use the signal 23.

kill -l gives the list of signals and I found that signal 23 (SIGURG)
seems to be ignored by processes. SIGURG sounds like "urgent" and so
this name would also fit into our needs.
1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL
5) SIGTRAP 6) SIGIOT 7) SIGBUS 8) SIGFPE
9) SIGKILL 10) SIGUSR1 11) SIGSEGV 12) SIGUSR2
13) SIGPIPE 14) SIGALRM 15) SIGTERM 17) SIGCHLD
18) SIGCONT 19) SIGSTOP 20) SIGTSTP 21) SIGTTIN
22) SIGTTOU 23) SIGURG 24) SIGXCPU 25) SIGXFSZ
26) SIGVTALRM 27) SIGPROF 28) SIGWINCH 29) SIGIO
30) SIGPWR

Or does this signal have another function yet?

With this signal a normal process will be untouched by this signal, but
a well programmed application could catch the signal to free up unused
memory and maybe save important data from memory to disk to avoid data
loss if the situation gets worse.

And if such an application fills up memory the user could ask it
manually to save memory by giving it a
kill -23 {PID}

Michael

-
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.tux.org/lkml/