Re: RFC/PATCH: Random pid generation (2nd try) - sorry

From: Adrian Bridgett (adrian.bridgett@iname.com)
Date: Tue Jan 11 2000 - 16:34:10 EST


On Tue, Jan 11, 2000 at 13:35:35 +0000 (+0000), Matthew Kirkwood wrote:
> On Tue, 11 Jan 2000, Ph. Marek wrote:
>
> > can somebody please explain why the stock kernel is *slower* than the
> > modified with a multiplication inside??
>
> When the pid space gets fragmented, the kernel often has to do a lot of
> work to find the next free pid. Until you have wrapped next_pid, that's
> not an issue, though.

Perhaps we need a simple version solely for this reason then - massively
multi-threaded/forked programs are out there. Maybe just add some
random number (or loop around a set of numbers (1, 2, 3, 7, 11 perhaps)).
If this is a good idea then I'm sure some mathmatician can point out a good
way...

Adrian

email: adrian.bridgett@iname.com, http://www.poboxes.com/adrian.bridgett
Windows NT - Unix in beta-testing. PGP key available on public key servers
Debian GNU/Linux -*- because I'm allergic to Prozac -*- www.debian.org

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:19 EST