pid rollover?

Stephen J. Friedl friedl at vsi.COM
Sun Feb 5 10:35:29 AEST 1989


> I believe that it sets nextpid to 100, at least it did on our BSD system.

In article <923 at auspex.UUCP>, guy at auspex.UUCP (Guy Harris) writes:
> And it doesn't on his (S5?) system.  Different systems do it
> differently.  (Actually, the S5R3 code sets "nextpid" - actually, "mpid"
> - to 0, but if process ID 0 isn't already in use something rather
> strange has happened on your system....)

Please note that PIDs are not necessarily monotonically
increasing on all systems.  On the AT&T 3B15 (the master CPU for
the multiprocessor 3B4000) the PIDs jump all over the place.  For
example, a trivial program to fork 20 times prints PIDs in the
following order:

12331 12331 8236 12331 8236 16397 12331 8236 16397 20535
12331 8236 16397 20535 28918 12331 8236 16397 20535 28918

Note the reassignment of old PIDs here.  You have to look
at the PIDs in hex to get any kind of pattern, and it probably
reflects processor assignment or some such.

     Steve

-- 
Stephen J. Friedl        3B2-kind-of-guy            friedl at vsi.com
V-Systems, Inc.       I speak for you only      attmail!vsi!friedl
Santa Ana, CA  USA       +1 714 545 6442    {backbones}!vsi!friedl
Nancy Reagan on these *stupid* .signatures: "Enough already, OK?"



More information about the Comp.unix.wizards mailing list