Pids
Henry Spencer
henry at utzoo.UUCP
Fri May 9 05:54:35 AEST 1986
Several solutions to the inefficient pid-duplication-search problem exist.
A few of them were described in the Usenix newsletter a while ago. The
simplest approach is the one Chris Torek has mentioned: it is trivial to
change the search loop so that instead of looking for an exact match, it
looks for the lowest pid >= than the one you're trying. Then if you don't
get an exact hit (the = part of >=), you've got a range of pids which are
known to be unused, and the search needs to be repeated only when that
range is exhausted. This idea has been independently re-invented several
times in different places.
--
Join STRAW: the Society To Henry Spencer @ U of Toronto Zoology
Revile Ada Wholeheartedly {allegra,ihnp4,decvax,pyramid}!utzoo!henry
More information about the Comp.unix.wizards
mailing list