Date: Wed, 29 Apr 1998 12:23:09 -0700 From: Conrad Minshall <conrad@apple.com> To: freebsd-hackers@FreeBSD.ORG Cc: Terry Lambert <tlambert@primenet.com> Subject: Re: SIGDANGER Message-ID: <l03102800b16d13c0d0a6@[17.202.43.185]> In-Reply-To: <199804290208.TAA07145@usr01.primenet.com> References: <Pine.SOL.3.96.980427231203.3622N-100000@mamba.cs.Virginia.EDU>
next in thread | previous in thread | raw e-mail | index | archive | help
This talk of SIGDANGER takes me back, way back. Long ago (circa '85) I worked for IBM on an operating system for a box called the RT PC. AIX was the OS, and yes, a young programmer (me) added SIGDANGER to it. Before SIGDANGER (and the failsafe measure SIGKILL code) AIX would freeze up if it ran out of paging space. That happened all too often because disk space was expensive, marketing wanted a low "entry" price, and so user systems were by default being configured with paging spaces too small for actual usage patterns. Note a fundamental requirement for AIX was that it support sparse allocation. Some AI and engineering applications required huge virtual address spaces that would be backed only "on demand". In the classic BSD model you must have disk space allocated for all virtual space, which was wasteful at best and prohibitively expensive at worst. At the time I suggested that sparse allocation should default off and processes have to request it somehow, but I was 1) very junior, and 2) unable to propose an implementation - the VM code was down in the mysterious "VRM", hidden from the Unix kernel layer. BTW, in the original AIX all signal bits were already in use so SIGEMT, which was unused by the system, got converted into SIGDANGER. That was of course a gross hack so later when time permitted signal bits were expanded beyond one 32 bit word and SIGDANGER switched from number 7 to number 33. So much for history/nostalgia. Terry: >If the guy with the highest working set has a SIGDANGER (I prefer >naming like SIGLOWMEM or something more descriptive of what the signal >actually indicates) handler registered, and pages do not become >available, then shoot the next highest working set guy, and so on. SIGLOSWAP then?. I chose SIGDANGER as I thought there might be a more general purpose use than just for critical lack of paging space. The generalized SIGDANGER was intended to mean "The system is in danger of crashing very soon. Processes, consider yourself warned." Terry: >Specifically, POSIX requires that if I free a segment, I should be able >to malloc the same sized or smaller segment immediately following the >free, and not have to check for failure. My copy of POSIX (the 1996 1003.1, also known as ISO 9945-1) specifies only that malloc and free must exist, leaving further definition to the C language standard. My copy of the C standard is ANSI's X3.159-1989. It makes no requirement that a free followed by a smaller or equal malloc must succeed. Perhaps this came up in one of the standard's "interpretations"(?) -- Conrad Minshall mailto:conrad@apple.com If "conrad@apple.com" doesn't work, try using my alternates: rad@acm.org, conradm@computer.org, conrad@technologist.com, and conrad.m@bigfoot.com Picon viewable at: http://facesaver.usenix.org/h/48/4704.htm To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?l03102800b16d13c0d0a6>