Patent ID: 8881159

Claim:
A method, in a data processing system, for allocating threads for execution of a parallel region of code, comprising: receiving, from a master thread executing in a processor of the data processing system, a request for allocation of one or more worker threads to execute the parallel region of code; accessing, from a cache storage of the data processing system, cached thread allocation information identifying prior thread allocations that have been performed for the master thread; allocating, by one or more processors of the data processing system, one or more worker threads to the master thread based on the cached thread allocation information; and executing, by the one or more processors of the data processing system, the parallel region of code using the allocated one or more worker threads, wherein executing the parallel region of code using the allocated worker threads comprises: comparing, by each of the one or more allocated worker threads, a local go value corresponding to the worker thread, in a local go vector register, to a global go value corresponding to the worker thread, in a global go vector register; causing the worker thread to exit an idle state in response to the comparison indicating a mismatch between the local go value and the global go value, wherein a work identifier is retrieved from a work identifier vector register in response to the worker thread exiting the idle state.