Date: Wed, 02 Jan 2002 12:49:37 -0800 From: Terry Lambert <tlambert2@mindspring.com> To: mitko@rila.bg Cc: hackers@freebsd.org Subject: Re: Magic number 100 in /sys/kern/kern_fork.c Message-ID: <3C337261.6BB5BFE0@mindspring.com> References: <20020102134345.2a00458f.mitko@rila.bg>
next in thread | previous in thread | raw e-mail | index | archive | help
Dimitar Peikov wrote: > > I've review /sys/kern/kern_fork.c file and have a question why the room of > 100 process numbers is hardcoded in the source? I think that if such room > is needed, it must be defined somewhere in headers, isn't it. > > Can someone explain me more the idea about that room? It's a setaside for system processes ("kprocs") at system start; think of it like the 1024 priviledged port reserve. I think the idea is to not have a random PID collide with a system process that was started at init time. If you start a heck of a lot of processes/kprocs, you will occasionally get collisions, but by not excluding where you *know* there are processes from the space, you are pretty much asking for a (very small) slowdown. The code is pretty straight forward, though a manifest constant mich be moreso; I don't know how permitting it to be changed would be of benefit. I could see how someone without scruples could "hide" processes, if it were runtime adjustable... -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C337261.6BB5BFE0>