Difference between revisions of "Pid"

From Hackepedia
Jump to navigationJump to search
(take out freebsd random pids as these don't work anymore sysctl 0 -> 0)
 
Line 4: Line 4:
  
 
[[OpenBSD]]  chooses a random pid number when a new [[process]] is [[fork]]ed, other systems choose the next sequentially available number, and when the maximum pid number is reached the number will wrap around back to the beginning.  This means that pids are recycled and on a busy system it may not take long for a new process to take the pid of another process that just ended.
 
[[OpenBSD]]  chooses a random pid number when a new [[process]] is [[fork]]ed, other systems choose the next sequentially available number, and when the maximum pid number is reached the number will wrap around back to the beginning.  This means that pids are recycled and on a busy system it may not take long for a new process to take the pid of another process that just ended.
 +
 +
There are patches for other OSes, including Linux have patches for this (http://www.vanheusden.com/Linux/sp/)

Latest revision as of 06:26, 30 July 2010

A pid is the process identification number. Special pids are swapper (0) and init (1).

Random pids

OpenBSD chooses a random pid number when a new process is forked, other systems choose the next sequentially available number, and when the maximum pid number is reached the number will wrap around back to the beginning. This means that pids are recycled and on a busy system it may not take long for a new process to take the pid of another process that just ended.

There are patches for other OSes, including Linux have patches for this (http://www.vanheusden.com/Linux/sp/)