Pids

root rbj at icst-cmr.arpa
Fri Apr 25 09:37:49 AEST 1986


I just finished reading McKusick's paper on `Measuring & Improving
the Performance of 4.2'. One of the things he dicusses is searching
the PROC tables when assigning PIDS for uniqueness.

I offer the following observations:

1) Pids seem to wrap at 32K. 
2) I have only observed this once, as our machine usually finds
   an excuse to crash, or we reboot it for somne reason. Even so, it
   took more than a week.
3) Until the wrap around, *each pid generated (++pid) is guaranteed
   to be unique*!
4) My solution is to have a flag (pidwrap) which is set at the obvious time.
   If the flag is clear, *why search at all*? If not, do it the hard way.
5) Any reason not to use unsigned pids, this doubling their range?
6) Has my brain been swapped out? Am I missing something?

	(Root Boy) Jim Cottrell		<rbj at cmr>
	"One man gathers what another man spills"



More information about the Comp.unix.wizards mailing list