lkml.org 
[lkml]   [2001]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRE: random PIDs
>  Finished & tested my random PID kernel/fork.c:get_pid() replacement. 
> > This one keeps track of the last N (default is 64) pids who have exited.
> > These are then not used. So, one cannot have more then 32767 - (64 + 1
> > (init) + 1 (idle)) = 32761 processes :o)
> DW> Huh, should be 32701, right?!
>
> You're absolutely right. It must've been the victory trance :o)
>
Have you actually tried to create lots of threads?

IIRC get_pid will loop forever if it doesn't find a free pid, and in the
worst case you can trigger that with ~11000 running threads.

And the current code can create multiple threads with the same pid (I
never tried to trigger that bug, but it seems to be possible)

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

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