> Particulary for large number of tasks, this can lead to frequent exercise of> the repeat resulting in a O(N^2) algorithm. We call this : <algo-0>.

Your math is flawed. The O(N^2) happens only when the name space for pid'shas the same order of magnitude as the number N of processes.Now consider N=100000 with 31-bit name space. In a series of2.10^9 forks you have to do the loop fewer than N times andN^2 / 2.10^9 = 5. You see that on average for each fork thereare 5 comparisons.For N=1000000 you rearrange the task list as I described yesterdayso that each loop takes time sqrt(N), and altogether N.sqrt(N)comparisons are needed in a series of 2.10^9 forks.That is 0.5 comparisons per fork.You see that thanks to the large pid space things get reallyefficient. Ugly constructions are only needed when a large fractionof all possible pids is actually in use, or when you need hardreal time guarantees.