发明名称 Constant time worker thread allocation via configuration caching
摘要 Mechanisms are provided for allocating threads for execution of a parallel region of code. A request for allocation of worker threads to execute the parallel region of code is received from a master thread. Cached thread allocation information identifying prior thread allocations that have been performed for the master thread are accessed. Worker threads are allocated to the master thread based on the cached thread allocation information. The parallel region of code is executed using the allocated worker threads.
申请公布号 US8881159(B2) 申请公布日期 2014.11.04
申请号 US201113070811 申请日期 2011.03.24
申请人 International Business Machine Corporation 发明人 Eichenberger Alexandre E.;O'Brien John K. P.
分类号 G06F9/46;G06F9/50 主分类号 G06F9/46
代理机构 代理人 Lammes Francis;Walder, Jr. Stephen J.;Stock William J.
主权项 1. 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.
地址 Armonk NY US