lkml.org 
[lkml]   [2000]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Why wrapping PIDs is evil [was 32bit]
On Sun, 16 Jan 2000, Horst von Brand wrote:

> > Someone want to sit and count sometime, how many processes are
> > started in a given (longish) time period? One thing that would be kind
> > of cute to hand le this would be a kernel log message saying every time
> > the PID count rolled over.
>
> One data point: My machine is now up for slightly more than a day (mostly
> idle, personal workstation). pids have rolled over at least once, and are
> now in the 400's. No compiling the kernel or anything like that which will
> boost the numbers. AFAIKS, when the system starts up in X (Gnome), it has
> run some 6000 processes already (that will take some 20s here)

Well, at 6000 processes every 20 seconds (approx 300/second) and a
PID space of 4294967295 (32bit unsigned int), you will roll over/run out in
around 165 days. Of course, if you wanted to use a PID space of
18446744073709551616 (64bit unsigned int), you will roll over/run out in
around 1,949,808,057 years...
Of course, who wants to type in a 20 digit number? :) I suppose if
you feel the need for security that badly you could patch the kernel to use
a 64bit PID space, and just panic when you run out, based on the assumption
that something _very_ bad is happening if you run out. :)

Stephen


-
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/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.498 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site