摘要 |
Embodiments of the present invention provide a task allocation method, a task allocation apparatus, and a network-on-chip. The method includes: determining the number of threads included in a to-be-processed task; determining, in a network-on-chip formed by a multi-core processor, a continuous area formed by routers-on-chip corresponding to multiple continuous idle processor cores whose number is equal to the number of the threads; if the area is a non-rectangular area, determining a rectangular area extended from the area; and if predicted traffic of each router-on-chip that is connected to a non-idle processor core and in the extended rectangular area does not exceed a preset threshold, allocating the multiple threads of the to-be-processed task to the idle processor cores in the area. According to the task allocation method provided in the embodiments of the present invention, the non-rectangular area is extended into a regular rectangular area by using an edge router to which a task has been allocated, and because task allocation is performed in combination with flexibility of an area shape and by using XY routing, problems of large hardware overheads, a low network throughput, low system utilization, and the like are avoided. |