[svlug] Reuse of pid's.
bill at wards.net
Thu Jan 22 00:05:20 PST 2009
On Wed, Jan 21, 2009 at 9:05 PM, Karen Shaeffer
<shaeffer at neuralscape.com> wrote:
> On Wed, Jan 21, 2009 at 01:33:32PM -0800, Bill Ward wrote:
>> On Wed, Jan 21, 2009 at 11:59 AM, Greg Lindahl <lindahl at pbm.com> wrote:
>> > On Wed, Jan 21, 2009 at 11:20:12AM -0800, Don Marti wrote:
>> >> Not really, since you don't know what pid the kernel
>> >> will give the next process it creates.
>> > 'cept they're traditionally handed out round-robin, which is why
>> > killall works most of the time. It's only when you have a very fast
>> > rate of process creation that you get into trouble.
>> Right, and so if you have process creation happening that fast, such
>> that a PID which was recently freed is already to be used again,
>> you've got bigger problems than this.
> Consider a process that the kernel launches with a new pid. Assume
> this process persists for a long time. The kernel will continue to
> issue new pid's that are greater than our hypothetical process's pid.
> And the kernel will eventually wrap back to the very low pids and start
> ascending the pid list again. And eventually the kernel will be issuing
> new pid's that are close to our hypothetical process's pid but less than
> it. And if you kill our hypothetical process at this moment, then the
> kernel may very well re-issue that pid very soon after it was freed.
Does it do them in numerical order, or does it maintain a queue of the
released ID's? I thought the latter.
More information about the svlug