Patent ID: 7992150

Claim:
A computer implemented method for waking client threads in a multiprocessor data processing system by awaking the client threads based on a given central processing unit on which the client threads are expected to run, the computer implemented method comprising: receiving a set of threads from an application; grouping the set of threads with a plurality of processors based on a last execution of the set of threads on the plurality of processors to form a plurality of groups, wherein threads in each group in the plurality of groups are all last executed on a same processor, wherein the grouping step comprises: sorting each thread in the set of threads based on a processor in the plurality of processors that a particular thread last ran on to form a sorted set of threads and selecting, for each processor in the plurality of processors, a subset of threads from the set of sorted threads, wherein the subset of threads forms a group in the plurality of groups and is last executed on a particular processor; wherein the sorting step comprises allocating memory storage for a list header of a processor; identifying link indices, wherein the link indices link the subset of threads for each processor, wherein the link indices utilize processor subscripts for linking the subset of threads; and initializing a value of the list header; locking a run queue for the same processor; waking up a first set of threads in a group in the plurality of groups prior to waking up a second set of threads in another group in the plurality of groups, wherein the first set of threads in the first group are woken up in a last-in-first-out order; unlocking the first set of threads in the first group; determining whether the first group contains additional threads; responsive to determining additional threads in the first group, waking up a set of the additional threads up to a maximum consecutive threads to be awakened, without releasing the run queue lock prior to waking up the set of additional threads; and releasing the run queue lock.