Asynchronous communication optimization method
By assigning asynchronous control cores to user programs on the heterogeneous multi-core platform and dividing communication exploration service subthreads, the problem of asynchronous communication is solved, asynchronous concurrency is achieved, and the performance of large-scale concurrent applications is improved.
Patent Information
- Application Number
- CN202110381609.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-09
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2041-04-09
AI Technical Summary
In the heterogeneous multi-core platform, the communication exploration service that controls the core cannot be asynchronous with the user process, resulting in limited concurrency and asynchronousness of communication and computing, resulting in low overlap rate of communication and computing and the performance needs to be improved.
By allocating control cores to each process interval of the user program, an asynchronous control core is formed that corresponds to the user process one by one, and the communication exploration service is divided into child threads, so asynchronous concurrent execution of the user program process and the communication exploration service thread is realized.
Fully explore the communication and computing asynchronousness of heterogeneous multi-core platforms, realize asynchronous concurrency between communication exploration services and user processes, and significantly improve the overall performance of communication-intensive large-scale concurrent applications.
Smart Images

Figure CN114217939B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an asynchronous communication optimization method and belongs to the technical field of high performance computing. Background Art
[0002] The most prominent advantage of heterogeneous many-core processors is high performance, which is especially suitable for the field of high-performance computing. They are mainly used in large-scale practical systems such as ultra-large-scale parallel machines. The computing resources of heterogeneous many-core platforms are huge, and the number of concurrent processes of application topics may reach tens of thousands or even hundreds of thousands. However, in the existing domestic heterogeneous many-core chips, the communication detection service of the control core and the user process in the "one-to-one correspondence" organizational structure of the control core and the computing core of the heterogeneous many-core platform cannot be asynchronous, which limits the concurrency and asynchrony of communication and computing. There are problems such as low overlap rate of communication and computing in large-scale concurrent applications and the need to improve performance. Therefore, according to the structural characteristics of heterogeneous many-core platforms, it has become a key research direction of communication optimization methods to study asynchronous communication optimization methods, solve the problem that the communication detection service of the control core cannot be asynchronous with the user process, and improve the overall performance of communication-intensive large-scale concurrent applications. Summary of the invention
[0003] The purpose of the present invention is to provide an asynchronous communication optimization method to solve the problem that the large-scale concurrent application communication computing overlap rate is low and the performance needs to be improved in a heterogeneous many-core platform.
[0004] To achieve the above object, the technical solution adopted by the present invention is: to provide an asynchronous communication optimization method, when the user program enables the asynchronous communication optimization method, the following steps are performed:
[0005] S1. Determine whether the physical resources meet the condition that the number of processes required by the user program is greater than or equal to twice. If so, execute the next step. If not, exit.
[0006] S2. Allocate a control core as a process control core for each process interval of the user program, and enable an idle control core as a dedicated control core between each user process, wherein the process control core and the dedicated control core constitute an asynchronous control core corresponding to each user process one by one;
[0007] S3, binding the computing core array corresponding to the process control core in each asynchronous control core described in S2 to the computing core array corresponding to the dedicated control core to the process control core in each asynchronous control core described in S2, so as to realize the logical combination of a single process control core and multiple computing core arrays;
[0008] S4. In each asynchronous control core, the communication detection service of the process on each process control core is divided into sub-threads, named as communication detection service threads, and a dedicated control core is allocated to the current communication detection service thread;
[0009] S5, the user program process in the process control core and the communication detection service thread in the dedicated control core are asynchronously executed concurrently;
[0010] S6. In each asynchronous control core, when the user program process (main thread) located in the process control core performs a key mutually exclusive operation with the communication detection service located in the dedicated control core (such as message sending / receiving actions, etc.), the thread semaphore is set to 1 to actively grab the lock and perform the key mutually exclusive operation. After the lock is successfully grabbed, the semaphore is set to 0, allowing the communication detection service to continue to compete for the thread lock.
[0011] Due to the application of the above technical solution, the present invention has the following advantages compared with the prior art:
[0012] The present invention provides an asynchronous communication optimization method for heterogeneous many-core chips, which fully exploits the asynchrony of communication and computing in the heterogeneous many-core platform, realizes the asynchronous concurrency of communication detection services and user processes, and effectively improves the overall performance of communication-intensive large-scale concurrent applications. It is of great significance in realistic high-performance applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Attached Figure 1 Schematic diagram of the logical combination of the control core and the computing core. DETAILED DESCRIPTION
[0014] Embodiment: The present invention provides an asynchronous communication optimization method. When a user program activates the asynchronous communication optimization method, the following steps are performed:
[0015] S1. Determine whether the physical resources (number of control cores) meet the condition of being greater than or equal to twice the number of processes required by the user program. If so, proceed to the next step. If not, the asynchronous communication optimization method cannot be applied and exit.
[0016] S2. Allocate a control core as a process control core for each process interval of the user program, and enable an idle control core as a dedicated control core between each user process, wherein the process control core and the dedicated control core constitute an asynchronous control core corresponding to each user process one by one;
[0017] S3, binding the computing core array corresponding to the process control core in each asynchronous control core described in S2 to the computing core array corresponding to the dedicated control core to the process control core in each asynchronous control core described in S2, so as to realize the logical combination of a single process control core and multiple computing core arrays;
[0018] S4. In each asynchronous control core, the communication detection service of the process (main thread) on each process control core is divided into sub-threads, named as communication detection service threads, and a dedicated control core is allocated to the current communication detection service thread;
[0019] S5, the user program process (main thread) located in the process control core and the communication detection service thread located in the dedicated control core are executed asynchronously and concurrently;
[0020] S6. In each asynchronous control core, when the user program process (main thread) located in the process control core performs a key mutually exclusive operation with the communication detection service located in the dedicated control core (such as message sending / receiving actions, etc.), the thread semaphore is set to 1 to actively grab the lock and perform the key mutually exclusive operation. After the lock is successfully grabbed, the semaphore is set to 0, allowing the communication detection service to continue to compete for the thread lock, thereby ensuring the asynchronous concurrency correctness of the communication detection service and the user program and avoiding interference of the detection service on the user program.
[0021] The above embodiment is further explained as follows:
[0022] This patented method is aimed at domestic heterogeneous many-core processors. By logically combining the control core and the computing core, the communication detection service is offloaded to the dedicated control core, thereby fully exploiting the asynchrony of communication and computing, achieving deep concurrency of communication and computing, and improving the overall performance of communication-intensive large-scale concurrent applications.
[0023] This patented method mainly includes two aspects:
[0024] 1) Control and operation core logic combination method, as shown in the attached Figure 1 As shown, it breaks the traditional view of "one-to-one correspondence" of heterogeneous multi-core platforms. By sensing the user program running mode, a single control core is logically combined with multiple computing core arrays through software methods, making it possible to implement dedicated asynchronous communication optimization on spare control cores. It is the basis of asynchronous communication optimization methods and makes rational use of resources. At the same time, the combination of a single control core and multiple computing cores can improve the computing power of user programs.
[0025] 2) The asynchronous communication optimization method based on the dedicated control core uses the thread semaphore mutual exclusion method, which not only ensures the correctness of the asynchronous concurrency of the communication detection service and the user program, but also avoids the interference of the communication detection service on the user program, thereby realizing efficient asynchronous concurrency of the communication detection service and the user program.
[0026] To achieve the above object, the technical solution adopted by the present invention comprises the following steps:
[0027] 1. Determine whether the physical resources (number of control cores) meet the condition of being greater than or equal to twice the number of processes required by the user program. If so, proceed to the next step. If not, the asynchronous communication optimization method cannot be applied and the process exits.
[0028] 2. Allocate a control core as a process control core for each process interval of the user program, and enable an idle control core as a dedicated control core between each user process, wherein the process control core and the dedicated control core constitute an asynchronous control core corresponding to each user process one by one;
[0029] 3. Bind the computing core array corresponding to the process control core in each "asynchronous control core" to the computing core array corresponding to the dedicated control core, and bind it to the process control core in each "asynchronous control core" to realize the logical combination of a single process control core and multiple computing core arrays;
[0030] 4. In each asynchronous control core, the communication detection service of the process (main thread) on each process control core is divided into sub-threads, named as communication detection service threads, and the dedicated control core corresponding to the process control core is allocated to the current communication detection service thread;
[0031] 5. The user program process (main thread) in the process control core and the communication detection service thread in the dedicated control core are executed asynchronously and concurrently;
[0032] 6. In each asynchronous control core, when the user program process (main thread) located in the process control core performs key mutually exclusive operations with the communication detection service located in the dedicated control core (such as message sending / receiving actions, etc.), the thread semaphore is set to 1 to actively grab the lock and perform key mutually exclusive operations. After the lock is successfully grabbed, the semaphore is set to 0, allowing the communication detection service to continue to compete for the thread lock.
[0033] When the above-mentioned asynchronous communication optimization method is adopted, it fully exploits the asynchrony of communication and computing in the heterogeneous many-core platform, realizes the asynchronous concurrency of communication detection services and user processes, and effectively improves the overall performance of communication-intensive large-scale concurrent applications, which is of great significance in real high-performance applications.
[0034] In order to facilitate a better understanding of the present invention, the terms used in this article are briefly explained below:
[0035] Heterogeneous many-core chip: a high-performance heterogeneous central processing unit that integrates a small number of general-purpose main cores that perform management, communication and computing functions and a large number of streamlined slave cores that perform computing functions on a complete chip; the general-purpose main core runs a general-purpose operating system, mainly performs the management and control functions of the entire chip, and also performs certain computing functions and the communication function between the chip and the outside world; the slave core plays the role of accelerating computing.
[0036] Control core: the universal main core of heterogeneous multi-core chips.
[0037] Computing core: heterogeneous many-core chip from the core core.
[0038] Program: A static entity stored on disk that contains executable machine instructions and data. A process or task is an active computer program.
[0039] Process: The basic unit of resource (CPU, memory, etc.) allocation, an instance of a program when it is executed, that is, a running program.
[0040] Thread: It is the smallest unit that the operating system can schedule operations on. It is contained in the process and is the actual operating unit in the process.
[0041] Asynchronous: Asynchronous processing of computer multithreading, as opposed to synchronous processing, does not block the current thread to wait for processing to complete, but allows subsequent operations until other threads complete the processing and call back to notify this thread.
[0042] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent changes or modifications made according to the spirit of the present invention should be included in the protection scope of the present invention.
Claims
1. An asynchronous communication optimization method, characterized in that: When the user program enables the asynchronous communication optimization method, the following steps are performed: S1. Determine whether the physical resources meet the condition that the number of processes required by the user program is greater than or equal to twice. If so, execute the next step. If not, exit. S2. Allocate a control core as a process control core for each process interval of the user program, and enable an idle control core as a dedicated control core between each user process, wherein the process control core and the dedicated control core constitute an asynchronous control core corresponding to each user process one by one; S3, binding the computing core array corresponding to the process control core in each asynchronous control core described in S2 to the computing core array corresponding to the dedicated control core to the process control core in each asynchronous control core described in S2, so as to realize the logical combination of a single process control core and multiple computing core arrays; S4. In each asynchronous control core, the communication detection service of the process on each process control core is divided into sub-threads, named as communication detection service threads, and a dedicated control core is allocated to the current communication detection service thread; S5, the user program process in the process control core and the communication detection service thread in the dedicated control core are asynchronously executed concurrently; S6. In each asynchronous control core, when the user program process located in the process control core performs a key mutual exclusion operation with the communication detection service located in the dedicated control core, the thread semaphore is set to 1 to actively grab the lock and perform the key mutual exclusion operation. After the lock is successfully grabbed, the semaphore is set to 0, allowing the communication detection service to continue to compete for the thread lock.
Citation Information
Patent Citations
Multi-core framework Internet information processing and optimizing method
CN103927225A
Thread for high-performance computer NUMA perception and memory resource optimizing method and system
CN104375899A