[lkml]   [2001]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: random PID generation
>> My code runs trough the whole task_list to see if a chosen pid is already

>> in use or not.
> But it doesn't check for a recently used PID. Lets say your system is
> exhausting 1000 PIDs/second, and that there is a window of 20ms between
> determining which PID to send to, and the recipient process receiving it.

Ah, I get your point. Good point :o)

I was thinking: I could split the PIDs up in 2...16383 and 16384-32767 and
switch between them when a process ends? nah, that doesn't help it.
I think random increments (instead of last_pid+1) would be the best thing to
do then?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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