发明名称 Flexible task and thread binding with preferred processors based on thread layout
摘要 Embodiments of thread binding are provided. An aspect includes generating a thread layout for an application. Another aspect includes determining a task count for the application; determining a task rank for each task of the task count; determining a thread count for each task associated with the application, wherein a thread count for a first task associated with the application is unequal to a thread count of a second task associated with the application; and indicating one or more preferred processors of a plurality of processors for each task associated with the application. Another aspect includes allocating system for each of the tasks of the application based on the thread layout. Another aspect includes affinitizing the tasks by generating child threads for each of the tasks, wherein a number of threads generated for each task corresponds to the thread count for the task in the thread layout.
申请公布号 US9158587(B2) 申请公布日期 2015.10.13
申请号 US201213353877 申请日期 2012.01.19
申请人 International Business Machines Corporation 发明人 Abeles James;Parpia Farid A.
分类号 G06F9/455;G06F9/46;G06F9/50 主分类号 G06F9/455
代理机构 Cantor Colburn LLP 代理人 Cantor Colburn LLP ;Chiu Steven
主权项 1. A computer program product for thread binding, the computer program product comprising: a non-transitory tangible storage medium readable by a processing circuit of a computer system and storing instructions for execution by the processing circuit for performing a method comprising: before starting execution of an application, generating a thread layout for the application, wherein generating the thread layout for the application before starting execution of the application comprises: determining a task count comprising a number of tasks required to execute the application, wherein a plurality of tasks is required to execute the application, and the task count corresponds to the number of the plurality of tasks;determining a task rank for each task of the plurality of tasks;determining a thread count for each task of the plurality of tasks, each thread count comprising a number of threads required to execute the thread count's respective task, wherein a thread count for a first task of the plurality of tasks is unequal to a thread count of a second task of the plurality of tasks; andindicating one or more preferred processors of a plurality of processors in the computer system for each task of the plurality of tasks, wherein a first task of the plurality of tasks requires a plurality of threads to execute, wherein a first processor is indicated as a preferred processor for a first thread of the plurality of threads required to execute the first task of the plurality of tasks, and wherein a second processor that is distinct from the first processor is indicated as a preferred processor for a second thread of the plurality of threads required to execute the first task; allocating system resources, the system resources comprising the plurality of processors, for each of the tasks of the plurality of tasks based on the generated thread layout by affinitizing the tasks of the plurality of tasks, the affinitizing comprising generating threads for each of the tasks of the plurality of tasks, wherein a number of threads generated for each task of the plurality of tasks corresponds to the thread count for the task in the thread layout, and wherein each of the threads is assigned to a processor of the one or more respective preferred processors that are specified for the thread's task in the generated thread layout, wherein the first thread of the plurality of threads required to execute the first task is assigned to the first processor, and the second thread of the plurality of threads required to execute the first task is assigned to the second processor that is distinct from the first processor; and executing each of the tasks required to execute the application by the generated threads in parallel using the plurality of processors, wherein the first thread of the plurality of threads required to execute the first task is executed on the first processor, and the second thread of the plurality of threads required to execute the first task is executed on the second processor that is distinct from the first processor, wherein the first processor is not indicated as a preferred processor for the second thread of the plurality of threads required to execute the first task of the plurality of tasks, and wherein the second processor that is distinct from the first processor is not indicated as a preferred processor for the first thread of the plurality of threads required to execute the first task.
地址 Armonk NY US