A method for asynchronous management of dynamic task allocation in heterogeneous many-core architecture

Through the asynchronous management method, the operation core actively notifies the execution status of the core task, solves the problem that the control core needs to poll the completion status of the task, realizes more efficient task management, and improves performance and real-time.

CN114217913BActive Publication Date: 2025-05-20JIANGNAN INST OF COMPUTING TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110325187.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-26
Publication Date
2025-05-20
Estimated Expiration
2041-03-26

AI Technical Summary

Technical Problem

In heterogeneous multi-core architecture, the control core needs to actively view the task completion status through polling and other methods, resulting in performance losses, untimely processing or congestion, and the non-task allocation mode is not applicable, which brings difficulties.

Method used

The asynchronous management method is adopted, and the operation core actively notifies the execution status of the core task through the operation core. After completing the tasks assigned by the control core, the operation core notifies the control core by asynchronously and obtains new computing task information.

Benefits of technology

This enables the control core to complete tasks independently without having to poll the control core. It has good performance, strong real-time performance, and good programmability and scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114217913B_ABST
    Figure CN114217913B_ABST
Patent Text Reader

Abstract

The present invention discloses a task dynamic allocation asynchronous management method under a heterogeneous multi-core architecture, comprising the following steps: S1, a computing core sends a task request to a control core; S2, initializes a task pool; S3, determines whether the task request type is a computing task or a control agent task; S4, the control core responds to the computing core request and allocates tasks to the computing core; S5, the control core continues the local task, the computing core receives the task sequence number from the control core, and executes the corresponding task; S6, sends a task completion report signal to the control core; S7, updates the task pool; S8, the computing core queries whether to update the task; S9, the control core continues to execute the local task; S10, waits for all tasks to be completed or the final result is obtained, and notifies the computing core to exit. The present invention solves the problem that the control core needs to actively check the task completion status by polling and other methods, but cannot perform other operations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for dynamically allocating and asynchronously managing tasks under a heterogeneous many-core architecture, and belongs to the technical field of task management under a heterogeneous many-core architecture. Background Art

[0002] In the field of high-performance computing, heterogeneous many-core processors have the characteristics of strong performance and high cost performance by combining control cores and computing cores in a hierarchical manner, and are widely used in large-scale practical systems such as ultra-large-scale parallel machines. In the deployment of large-scale computing applications, in order to make full use of a large number of computing cores, tasks are divided through network messages at the control core level, and parallel scheduling needs to be performed through the control core inside the processor to allocate computing tasks to the computing cores.

[0003] The control core maintains a task pool obtained through a message protocol and hands it over to the computing cores to complete the computing tasks, which can also be divided into two modes: static allocation and dynamic allocation. Static allocation means that tasks are evenly allocated to each computing core according to a certain rule. For example, according to the computing core number, only when all computing cores complete the computing tasks in the task pool, the current processor is considered to have completed the tasks and can enter the next stage of the application process, or continue to obtain more tasks through the message protocol; dynamic allocation means that at the beginning, a part of the tasks are allocated to each computing core according to a certain rule, and when the computing cores complete the allocated tasks, more tasks are allocated to them until all tasks are completed.

[0004] The tasks of high-performance computing applications are usually sensitive to data, and the computing task complexities corresponding to different input data are not the same. From an implementation perspective, that is, the control flow logic is relatively complex and is related to the input data. Therefore, different computing cores may go through different execution paths when executing tasks and require different execution times. When the task scale is large, there is likely to be a phenomenon of load imbalance. Especially in the static allocation method, the time for the processor to complete the tasks is limited by the computing core that completes the tasks last, and at many times, a large number of computing cores are in an idle state, seriously wasting computing resources and also causing power consumption losses. Therefore, the dynamic task allocation mode is a more efficient choice when deploying large-scale task applications in a heterogeneous many-core architecture.

[0005] In a heterogeneous multi-core processor, the usual dynamic task execution mode is that the control core assigns tasks to the computing cores and polls the execution status of each core through methods such as shared memory. When it is found that the current task of a certain computing core has been completed, a task is assigned to it and the task pool is updated until all tasks are completed. In this execution mode, the control core is in a polling state, and there are the following problems: 1. The control core can only participate in parallel message or computing tasks by means of multi-threading or adding other polling operations, resulting in a large performance loss; 2. The control core needs to query too much data of the computing cores, which may cause untimely processing or congestion; 3. When the control core polls, it is in a hanging state, which is not suitable for non-task assignment modes and requires user judgment and control, bringing difficulties to the implementation of the runtime library and application development. Summary of the Invention

[0006] The object of the present invention is to provide a method for dynamically allocating and asynchronously managing tasks in a heterogeneous multi-core architecture to solve the problem that the control core needs to actively check the task completion status by means of polling and cannot perform other operations.

[0007] To achieve the above object, the technical solution adopted by the present invention is: to provide a method for dynamically allocating and asynchronously managing tasks in a heterogeneous multi-core architecture, including the following steps:

[0008] S1. The arithmetic core sends a task request to the control core;

[0009] S2. When the control core receives the task request from the arithmetic core for the first time, it initializes the task pool;

[0010] S3. The control core determines whether the task request type is a computing task or a control proxy task according to the received task request type. If the task request type is a control proxy task, it starts the corresponding proxy thread to complete the request; otherwise, it proceeds to the next step;

[0011] S4. The control core responds to the arithmetic core request and allocates tasks to the arithmetic core;

[0012] S5. The control core continues with local tasks, and the arithmetic core receives the task number from the control core and executes the corresponding task;

[0013] S6. After the arithmetic core completes the task execution, it sends a task completion report signal to the control core;

[0014] S7. After the control core receives the task completion report signal from the arithmetic core, it updates the task pool and checks whether there are unassigned tasks. If there are, it assigns the unassigned tasks to the arithmetic core. If not, it proceeds to the next step;

[0015] S8. The operation core checks whether there is an updated task. If so, it jumps to S5 to continue execution. If not, all tasks of this operation core are completed and it exits.

[0016] S9. The control core continues to execute local tasks. If there are completion reports of other operation core tasks, it returns to S4. Otherwise, it proceeds to the next step.

[0017] S10. After the local tasks of the control core are completed, it waits for all tasks to be completed or for the final result to be obtained, and then notifies the computing core to exit.

[0018] The further improved solutions in the above technical solutions are as follows:

[0019] 1. In the above solution, the local tasks described in S5 include updating the local task pool to be completed through inter-node message communication and calculating whether the final result has been obtained.

[0020] Due to the application of the above technical solution, the present invention has the following advantages compared with the prior art:

[0021] The present invention enables the control core to autonomously complete tasks, without the need to hang and poll the control core. After receiving the signal from the operation core, it processes according to the type of signal, with good performance, strong real-time performance, and at the same time having good programmability and scalability. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Attached Figure 1 is a flowchart of the dynamic task allocation and asynchronous management of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0023] Embodiment: The present invention provides a method for dynamic task allocation and asynchronous management in a heterogeneous multi-core architecture, specifically including the following steps:

[0024] S1. The operation core sends a task request to the control core.

[0025] S2. The control core receives the task request from the operation core for the first time and initializes the task pool.

[0026] S3. The control core determines whether the task request type is a computing task or a control proxy task according to the received task request type. If the task request type is a control proxy task, such as printing, IO access, etc., it starts the corresponding proxy thread to complete the request. Otherwise, it proceeds to the next step.

[0027] S4. The control core responds to the operation core request and allocates tasks to the operation core.

[0028] S5. The control core continues with local tasks, and the operation core receives the task number from the control core and executes the corresponding task.

[0029] S6. After the operation core finishes executing the task, it sends a task completion report signal to the control core;

[0030] S7. After the control core receives the task completion report signal from the operation core, it updates the task pool and checks whether there are unassigned tasks. If there are, it assigns the unassigned tasks to the operation core. If not, it proceeds to the next step;

[0031] S8. The operation core checks whether there is an updated task. If there is, it jumps back to S5 to continue execution. If not, all tasks of this operation core have been executed and it exits;

[0032] S9. The control core continues to execute local tasks. If there are other task completion reports from operation cores, it returns to S4. Otherwise, it proceeds to the next step;

[0033] S10. After the local tasks of the control core are executed, it waits for all tasks to be executed or for the final result to be obtained, and then notifies the computing core to exit.

[0034] The local tasks described in S5 include updating the local task pool to be completed through inter-node message communication and calculating whether the final result has been obtained.

[0035] The further explanation of the above embodiments is as follows:

[0036] In a heterogeneous architecture, there is usually a signal mechanism from the operation core to the control core, that is, in the software kernel of the control core, the access to specific register addresses by the operation core is responded to, and the function of asynchronous notification is realized. The present invention is based on this asynchronous notification mechanism. The operation core actively notifies the control core of the task execution status. After the operation core completes the task assigned by the control core, it notifies the control core asynchronously and obtains new computing task information. When there is no signal, the control core can independently perform other tasks. After receiving the signal from the operation core, it processes according to the type of the signal. The control core also needs to respond to task applications, completion reports, and other proxy requests. During the remaining idle time, the control core can perform parallel message communication or complete some computing tasks. It has good performance and strong real-time performance, and at the same time does not require additional polling operations and has good programmability.

[0037] In a heterogeneous many-core architecture, the control core maintains the task pool and the operation core dynamically obtains tasks, which is an effective means to achieve load balancing within the node. The dynamic task allocation under the heterogeneous many-core architecture means that the control core maintains the task pool and allocates tasks, and the operation core obtains and executes tasks, and the utilization rate of the operation core is improved through the method of dynamic allocation.

[0038] To avoid problems such as control core occupation, untimely response, and programming difficulties caused by the control core polling the task completion status of the computing core, the present invention proposes an asynchronous management method based on a signal mechanism. The computing core notifies the control core of the task status through an asynchronous mechanism, mainly including the method for the control core to process the task request signal of the computing core and the mechanism for the control core to classify and process the tasks of the computing core;

[0039] Among them, the specific process of the control core is as follows:

[0040] 1. Receive the task request from the first computing core and initialize the task pool;

[0041] 2. Judge the task type. For control agent signals, such as the printing request, IO request, and finding the result and exiting of the computing core, start a thread to handle them;

[0042] 3. Enter the task management stage, respond to the request of the computing core, and allocate tasks;

[0043] 4. Continue with local tasks of the control core such as inter-node messages and calculations;

[0044] 5. After receiving the task completion report signal from the computing core, update the task pool, check if there are unallocated tasks, and if so, allocate them to the computing core;

[0045] 6. Continue to execute. If there are other task completion reports, return to step 3, otherwise execute downward;

[0046] 7. After the local calculation task is completed, wait for all tasks to be completed or obtain the final result, and notify the computing core to exit.

[0047] The specific process for the computing core to execute tasks is as follows:

[0048] 1. Send a task request to the control core

[0049] 2. Receive the task number and execute the corresponding task;

[0050] 3. After the task is completed, report to the control core;

[0051] 4. Check if there is an updated task. If so, jump to step 2 and continue to execute;

[0052] 5. After all tasks are completed, exit.

[0053] It should be noted during the implementation of this algorithm. Considering performance, the kernel of the control core may only support one asynchronous signal path from the computing core, and the control core may need to respond to multiple asynchronous requests from the computing core. Here, it can be divided into two categories:

[0054] 1. A set of long-term computing tasks, dynamically processed through a signal mechanism;

[0055] 2. Short-term one-time proxy tasks, quickly processed by starting threads.

[0056] The signal mechanism involved in the present invention can be other asynchronous notification methods implemented through a combination of software and hardware.

[0057] When adopting the above task dynamic allocation and asynchronous management method under a heterogeneous multi-core architecture, it enables the control core to autonomously complete tasks without hanging and polling the control core. After receiving the signal from the computing core, it processes according to the signal type, with good performance, strong real-time performance, and at the same time having good programmability and scalability.

[0058] To facilitate a better understanding of the present invention, the following will briefly explain the terms used in this article:

[0059] Heterogeneous multi-core: A high-performance heterogeneous central processing unit architecture that integrates a small number of general main core cores responsible for management, communication, and computing functions and a large number of streamlined slave core cores responsible for computing functions on a complete chip; the general main core core runs a general operating system, mainly undertakes the management and control functions of the entire chip, and also undertakes certain computing functions and the communication functions between the chip and the outside; the slave core core plays a role in accelerating computing.

[0060] Dynamic task allocation: A method that maintains a task pool through a task manager and dynamically allocates tasks to task executors according to the task completion situation to ensure load balance and accelerate the task completion progress.

[0061] Task asynchronous management mode: The task manager does not block and wait during the execution of tasks by the executor, but instead executes other tasks such as communication and computing.

[0062] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable those familiar with this technology to understand the content of the present invention and implement it accordingly, and cannot be used to limit the protection scope of the present invention. All equivalent changes or modifications made according to the spirit and essence of the present invention should be covered within the protection scope of the present invention.

Claims

1. A method for asynchronous management of dynamic task allocation in a heterogeneous many-core architecture, characterized in that: The following steps are involved: S1, the computing core sends a task request to the control core; S2, the control core receives the task request from the first computing core and initializes the task pool; S3, the control core determines whether the task request type is a computing task or a control agent task according to the type of the task request received. If the task request type is a control agent task, the corresponding agent thread is started to complete the request. Otherwise, the next step is executed. S4, the control core responds to the request of the computing core and assigns tasks to the computing core; S5, the control core continues the local task, and the computing core receives the task sequence number from the control core and executes the corresponding task; S6. After the computing core completes the task, it sends a task completion report signal to the control core; S7, after receiving the task completion report signal from the computing core, the control core updates the task pool and searches for unassigned tasks. If so, the unassigned tasks are assigned to the computing core. If not, the next step is executed. S8, the computing core checks whether there is an update task, if yes, it jumps to S5 to continue execution, if not, the computing core task is completely executed and exits; S9, the control core continues to execute the local task. If there is a task completion report from other computing cores, it returns to S4, otherwise it executes the next step; S10, after the local task of the control core is executed, wait for all tasks to be executed or obtain the final result, and notify the computing core to exit.

2. The method for asynchronous management of dynamic task allocation in a heterogeneous many-core architecture according to claim 1, characterized in that: The local task described in S5 includes updating the local task pool to be completed through inter-node message communication and calculating whether the final result has been obtained.

Citation Information

Patent Citations

  • data processing method and system based on a Shenwei heterogeneous many-core processor

    CN109828790A

  • Heterogeneous many-core processor-oriented multi-task parallel scheduling method

    CN112416539A