Description:
Paul: This is a fix for a problem where if we run out of available
pids, get_pid will hang the system while it searches through the
tasks for an available pid forever.
Rajan: get_pid() function takes a long time to find the next
available pid once the last pid reaches the PID_MAX. This is due
to a constant rescan of the task list while progressing only one
pid at time, yielding an O(n**2) problem. This patch (together with
Paul's fix) which eliminates the time taken to search for an available
pid, by not constantly restarting the search through the entire
task list.
|