WO2009067950A1 - Management method and device of shared memory in multi-core system - Google Patents

Management method and device of shared memory in multi-core system Download PDF

Info

Publication number
WO2009067950A1
WO2009067950A1 PCT/CN2008/073148 CN2008073148W WO2009067950A1 WO 2009067950 A1 WO2009067950 A1 WO 2009067950A1 CN 2008073148 W CN2008073148 W CN 2008073148W WO 2009067950 A1 WO2009067950 A1 WO 2009067950A1
Authority
WO
WIPO (PCT)
Prior art keywords
shared memory
global
memory
locally
core system
Prior art date
Application number
PCT/CN2008/073148
Other languages
French (fr)
Chinese (zh)
Inventor
Dingchun Chen
Original Assignee
Huawei Technologies Co., Ltd.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co., Ltd. filed Critical Huawei Technologies Co., Ltd.
Publication of WO2009067950A1 publication Critical patent/WO2009067950A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/76Architectures of general purpose stored program computers
    • G06F15/78Architectures of general purpose stored program computers comprising a single central processing unit
    • G06F15/7839Architectures of general purpose stored program computers comprising a single central processing unit with memory
    • G06F15/7842Architectures of general purpose stored program computers comprising a single central processing unit with memory on one IC chip (single chip microcontrollers)

Definitions

  • the present invention relates to the field of computer applications, and in particular, to a method and apparatus for managing shared memory in a multi-core system.
  • Multi-core memory management technology is a key technology in multi-core technology. The whole system architecture depends on it. Its performance directly affects the performance and competitiveness of multi-core processors.
  • the memory management method is as follows: Memory is not supported between multiple cores. When communicating between multiple cores, it is necessary to copy the memory contents multiple times.
  • FIG. 1 shows the schematic diagram of the communication between two CPUs in the solution.
  • the specific processing flow includes the following steps:
  • Step 1 CPU1 applies for a memory block from its own memory space
  • Step 2 CPU1 constructs a data packet, which contains the communication contents of CPU1 and CPU2;
  • Step 3 The CPU 1 carries the above data packet in the requested memory block, and sends the data packet to the communication line between the CPU 1 and the CPU 2;
  • Step 4. CPU1 releases the memory block of the above application, so that the memory block is reused;
  • Step 5 The above data packet is transmitted to the CPU 2 through the communication line;
  • Step 6. CPU2 applies for a memory block from its own memory space; [14] Step 7.
  • the CPU 2 reads the above data packet from the communication line, and the data packet is stored in the memory block applied by itself;
  • Step 8. CPU2 processes the above data packet
  • Step 9 After processing the above data packet, CPU2 releases the requested memory block and the communication ends.
  • the embodiment of the invention provides a method and a device for managing shared memory in a multi-core system, which can support shared memory to be freely transferred between CPUs, greatly reducing the probability of shared memory access conflicts, and effectively improving the multi-core system. performance.
  • the embodiment of the present invention provides a method for managing shared memory in a multi-core system, including:
  • the CPU is capable of accessing the locally shared memory
  • the CPU in the multi-core system carries information through the global shared memory and locally shared memory
  • the embodiment of the present invention further provides a management device for sharing memory in a multi-core system, including:
  • a global shared memory configuration module configured to configure global shared memory in a multi-core system, wherein all CPUs in the multi-core system can access the global shared memory
  • a local shared memory configuration module configured to configure locally shared memory in a multi-core system, wherein a portion of the CPUs in the multi-core system can access the locally shared memory.
  • the global shared memory and the locally shared memory are configured in a multi-core system. It can support shared memory freely transfer between CPUs, which greatly reduces the probability of shared memory access conflicts and effectively improves the performance of multi-core systems.
  • FIG. 1 is a schematic diagram of a principle of communication between two CPUs in the prior art
  • 2 is a schematic diagram of memory sharing in which multiple sharing modes coexist according to Embodiment 1 of the present invention
  • FIG. 3 is a schematic diagram of a principle of dividing a global shared area and a local shared area implemented by memory mapping according to Embodiment 1 of the present invention
  • FIG. 4 is a schematic diagram of transferring a memory block between multiple cores according to Embodiment 1 of the present invention.
  • FIG 5 a schematic view of the utilization of a variety of types of shared memory according to a second embodiment of the invention
  • FIG. 6 one kind of memory according to a second embodiment of the matching processing based on the flowchart of the present invention, the minimum matching principle
  • Figure 7 is
  • FIG. 8 is a schematic structural diagram of a multi-core memory sharing processing apparatus according to Embodiment 4 of the present invention.
  • Embodiments of the present invention propose global sharing (Global Shared) and local sharing (Local)
  • Global sharing Global shared memory is accessible from the perspective of access rights.
  • Local sharing Local shared memory From the perspective of access rights, only some CPUs can access, other CPUs cannot access;
  • Full sharing Fully shared memory from the perspective of operational rights, the access to the CPU can be fully controlled; semi-shared: semi-shared memory from the perspective of operational permissions, the access to the CPU only partial permissions, such as readable but not writeable, Use memory but cannot apply for memory, etc.
  • the embodiment of the present invention configures the above-mentioned global shared memory in a multi-core system. And locally shared memory.
  • global fully shared and global semi-shared memory is configured in the global shared memory, and all CPUs in the multi-core system can completely control the global fully shared memory, and part of the CPU in the multi-core system
  • the global semi-shared memory can be fully controlled, while other CPUs can only partially control the global semi-shared memory.
  • local fully shared and locally semi-shared memory is configured in the locally shared memory, and a part of CPUs in the multi-core system capable of accessing the locally shared memory can completely complete the locally fully shared memory. Controlling, a particular CPU of a portion of the CPU capable of accessing the locally shared memory, is capable of full control of the locally semi-shared memory.
  • Embodiments of the present invention configure the global shared memory and the locally shared memory of various length types according to the lengths of various service data packets in the multi-core system.
  • the global shared memory carrying the service data packet is transferred between the CPUs, and the global shared memory is released by the CPU that last uses the global shared memory.
  • the multicast data packet is carried in the global shared memory, the address information of the multicast data packet is copied into multiple copies, and the multiple address information is separately sent to each destination CPU; Address information
  • Embodiment 1 is shown in FIG. 2, which is a schematic diagram of memory sharing in which multiple sharing modes are provided in the first embodiment.
  • the principle of coexistence of the multiple sharing modes is to divide the memory sharing area into several sub-areas, and flexibly set the access rights and read-write rights of each sub-area to achieve the purpose of coexistence of multiple sharing modes.
  • the shared memory is divided into a plurality of global shared areas and local shared areas, and the division of the global shared area and the local shared area is related to the service distribution on each CPU.
  • the global shared area allows all CPU access, and the local shared area allows partial (one or several) CPU access, and each local shared area cannot access each other.
  • local shared area 1 only allows CPU1 and CPU2 access
  • local shared area m only allows CPUn access
  • global shared area allows all CPUs (CPU 1 - CPUn) to access. Therefore, by dividing the shared memory area into a global shared area and a local shared area, the possibility of multi-CPU competition can be reduced, and all the original CPU competitions become partial CPU competition or no competition at all (one CPU exclusive local shared area).
  • a certain local shared area or a global shared area can be further subdivided into a full shared area and a semi-shared area.
  • the shared area of the local shared area 1, C PU1 and CPU2 can be fully controlled, and the semi-shared area of the local shared area 1, CPU1 has only partial operational rights, CPU2 can be fully controlled; local shared area m Full shared area, CPUn can be fully controlled, and the shared area m is a semi-shared area.
  • CPUn has only partial operation rights; the shared area of the global shared area, all CP Us can be completely controlled, and the semi-shared area of the global shared area, CPU1 ⁇ CPUn-l only have partial operation rights, and CPUn can be fully controlled.
  • application scenario 1 allocates separate code segments and data segments for each CPU, and each CPU does not mutually exclusive access to its own. Data segment;
  • application scenario 2 only one CPU is allowed to modify the heartbeat count value, and other CPUs only read the heartbeat count value.
  • FIG. 3 The schematic diagram of the division principle of the global shared area and the local shared area implemented by the memory mapping provided in the first embodiment is shown in FIG. 3.
  • CPUs there are 32 CPUs in a multi-core system of the architecture.
  • CPU 0 is responsible for controlling maintenance services.
  • CPU1 and CPU2 are responsible for multicast processing and MAC layer messaging.
  • CPU3-CPU31 can be independent. Handle voice and data services. Since each CPU works independently, it is necessary to divide 32 independent code segments and data segments (local shared areas) in the shared memory for each CPU to process the service; in addition, communication between the CPUs is required, and the memory needs to be in the CPU. Inter-pass, therefore, also need to divide a multi-core communication segment (global shared area) in the shared memory.
  • the division of the global shared area and the local shared area may be implemented by a memory mapping, where the memory mapping refers to a conversion relationship between a virtual address and a physical address.
  • the CPU accesses the memory by using a virtual address. As shown in FIG. 3, on the CPU, the same virtual address space is mapped to different physical memory, and a local shared area can be realized. On CPU0, the accessed data segment is the portion indicated by the solid arrow; on the CPU 31, the accessed data segment is the portion indicated by the dashed arrow.
  • mapping the same virtual address space to the same physical memory can implement a global shared area, such as the multi-core communication segment in FIG.
  • Multi-core processors can provide relevant hardware implementation memory mapping, and memory mapping can also be implemented by software.
  • FIG. 6 A schematic diagram of a memory block transferred between multiple cores according to Embodiment 1 is shown in FIG.
  • a private memory pool is established for each CPU in a software manner, where the private is relative, not other CPUs cannot access, but refers to the private memory.
  • the owner of the pool can apply for and release memory, while other CPUs can only use and release, but do not apply for permission. Therefore, the private memory pool is a semi-shared memory area. Peer, considering that if you need to create a private memory pool for each CPU, you need more memory, and in the case of sudden traffic, there is a risk of insufficient resources. Therefore, in the global shared area, a common memory pool is created, which is a full shared area.
  • the multi-core communication segment is located in the global shared area, all CPUs can access the area, and the memory blocks in the private memory pool of each CPU can be arbitrarily transferred between the multi-cores, and the end-release principle is adopted, and the last used memory block is used.
  • the CPU releases the memory block back to the CPU that first applied for the memory block.
  • the memory block requested by CPU0 can be transferred between other CPUs, and the CPU (CPU1) that last used the memory block releases the memory block back to CPU0's private memory pool.
  • the above method of transferring memory blocks between multiple cores can realize 0 copies of communication between multiple cores, thereby avoiding multiple copies of communication contents.
  • Embodiment 2 This embodiment provides a diversified design of a shared memory type in a multi-core system, and can configure a corresponding memory type and a number of memory blocks according to specific service requirements, and automatically select an appropriate memory to carry and transmit service data. , improve memory utilization.
  • each service has a different packet length, and the largest packet length is 1024 bytes.
  • the shared memory can be configured to be 32 bytes, 64 bytes, 128. Bytes, 256 bytes, 512 bytes, 1024 bytes, etc., and according to the actual business model, allocate a certain number of memory blocks for various types of memory to form a memory pool. For example, if the number of packets of 128 bytes to 512 bytes accounts for more than 50% of the total traffic, then allocate more memory space for 128 bytes, 256 bytes, and 512 bytes of memory, which is less for other types of memory. Allocate some memory space.
  • FIG. 6 A flow matching processing flowchart based on the minimum matching principle provided in the second embodiment is shown in FIG. 6. For different service types, quickly select the appropriate memory type through the "Minimum Matching Principle". The specific processing is as follows:
  • the service data packet length is 500 bytes.
  • memory there are two types of memory in the system: 512 bytes and 1024 bytes, which can be used to carry the service data packet. According to the "minimum matching principle", first select 512 words. Section memory, if the 512-byte memory does not have a corresponding free memory block, further select 1024 bytes of memory.
  • Embodiment 3 is a schematic diagram of a memory level multicast technology provided in this embodiment.
  • This embodiment is based on memory sharing between multiple cores, and proposes a multicast technology at the memory level.
  • the specific processing process is as follows: After sharing the shared memory area, one or more dedicated multicast pools are opened for the CPU supporting the multicast function, and multicasting is performed. A certain number of multicast message blocks are stored in the pool, such as 4096. The specific quantity depends on the number of multicast services.
  • Each multicast message block includes a multicast packet address, a size domain, and a multicast control domain (such as multicast).
  • the multicast packets are not copied, but the information of the multicast packets (including the address and its size) is transmitted to the destination through the message channel, and the destination CPU is based on the multicast data.
  • the packet information is obtained and processed.
  • CPU1 receives a multicast packet and stores the multicast packet in the memory of the global shared area. Then, the CPU 1 accesses the dedicated multicast pool, requests and constructs a multicast message packet (the multicast message block contains information such as the storage address and size of the multicast data packet), and transmits the constructed multicast message packet to the CPU for each purpose. Then, each destination CPU parses the storage address and the size of the multicast data packet according to the information in the multicast message packet, acquires the multicast data packet according to the storage address, and performs corresponding processing on the multicast packet. In the above process, there is always only one multicast packet, which avoids the process of copying the multicast packet during the multicast process, and improves the multicast processing efficiency.
  • Embodiment 4 is a schematic structural diagram of a processing device for implementing multi-core memory sharing proposed in this embodiment, as shown in FIG. 8, and includes the following modules:
  • the global shared memory configuration module is configured to configure global shared memory in a multi-core system, and all CPUs in the multi-core system can access the global shared memory; including: a global fully shared memory configuration module, global semi-shared memory Configure the module.
  • a local shared memory configuration module configured to configure locally shared memory in a multi-core system, and a portion of CPUs in the multi-core system can access the locally shared memory. Including: local full shared memory configuration module, local semi-shared memory configuration module.
  • a memory mapping module configured to map virtual address spaces of respective CPUs to the same physical address space, configure the global shared memory for each CPU; map virtual address spaces of the respective CPUs to different physical address spaces, The locally shared memory is configured for each CPU.
  • the memory type configuration module is configured to configure, according to the length of the various service data packets, the global shared memory of the respective length types and/or the locally shared memory.
  • a memory matching processing module configured to: when there are multiple types of the global shared memory in the multi-core system, and/or the locally shared memory can carry the same type of service data packet, and select the type of the smallest length The global shared memory or the free memory block in the locally shared memory to carry the service data packet.
  • a memory delivery module configured to transfer the global shared memory carrying the service data packet between the CPUs, and release the global shared memory by a CPU that last uses the global shared memory
  • a multicast packet processing module configured to carry the multicast data packet in a global shared memory, copy the address information of the multicast data packet into multiple copies, and send multiple copies to the plurality of destination CPUs. Address information of the multicast data packet, the plurality of destination CPUs acquiring the multicast data packet from the global shared memory according to the address information.
  • the global shared memory configuration module in the global shared memory configuration module is configured to configure global fully shared memory in the global shared memory, and all CPUs in the multi-core system can be fully shared by the global Full control of the memory;
  • the global semi-shared memory configuration module in the global shared memory configuration module is configured to configure global semi-shared memory in the global shared memory, and part of the CPU in the multi-core system can access the global semi-shared memory. Full control is performed, while other CPUs are only able to partially control the global semi-shared memory.
  • the local shared memory configuration module in the local shared memory configuration module is configured to configure locally fully shared memory in the locally shared memory, and the multi-core system can access the local shared
  • the stored part of the CPU is capable of completely controlling the locally fully shared memory
  • the local semi-shared memory configuration module in the local shared memory configuration module is configured to configure local semi-shared memory in the locally shared memory, and a part of the CPU in the multi-core system capable of accessing the locally shared memory The specific CPU in the middle can fully control the local semi-shared memory.
  • each unit included is only divided according to functional logic, but is not limited to the above division, as long as the corresponding function can be implemented;
  • the specific names are also for convenience of distinguishing from each other and are not intended to limit the scope of the present invention.
  • the embodiment of the present invention supports shared memory freely transferred between CPUs, and supports flexible allocation of memory sharing modes on each CPU, thereby realizing multiple memory sharing modes. Therefore, the process of communication between the multi-cores can be simplified, the probability of the shared memory access conflict is greatly reduced, the performance of the multi-core system is improved, and the multi-core communication ⁇ 0 copy can be realized.
  • the memory type is diversified and can be improved. Memory utilization reduces development costs and implements multi-core memory-level multicast technology, which improves multicast processing efficiency and helps improve multi-core system performance.

Abstract

A management method and device of shared memory in a multi-core system are provided. The method concretely includes the following steps: a globally shared memory and a locally shared memory are allocated in the multi-core system; all the CPUs in the multi-core system can access the globally shared memory, and a part of the CPUs in the multi-core system can access the locally shared memory.

Description

说明书 多核系统中共享内存的管理方法和装置  Description Method and device for managing shared memory in multi-core system
[I] 本申请要求于 2007年 11月 29日提交中国专利局、 申请号为 200710178405.4, 发 明名称为"多核系统中共享内存的管理方法和装置"的中国专利申请的优先权, 其 全部内容通过弓 I用结合在本申请中。  [I] This application claims the priority of the Chinese Patent Application entitled "Management Method and Device for Shared Memory in Multi-core System" submitted by the Chinese Patent Office on November 29, 2007, with the application number of 200710178405.4, the entire contents of which are The bow I is used in conjunction with this application.
[2] 技术领域  [2] Technical field
[3] 本发明涉及计算机应用领域, 尤其涉及一种多核系统中共享内存的管理方法和 装置。  [3] The present invention relates to the field of computer applications, and in particular, to a method and apparatus for managing shared memory in a multi-core system.
[4] 发明背景 [4] Background of the invention
[5] 目前, 在当今电子、 通信和 IT行业中, 不论是嵌入式系统, 还是通用计算机系 统, 单核处理器的局限性日益明显, 已经越来越不能满足用户对高性能、 大容 量的要求。 于是多核, 即多 CPU (Central Processing  [5] At present, in today's electronics, communications and IT industries, whether it is an embedded system or a general-purpose computer system, the limitations of single-core processors are becoming more and more obvious, and users are increasingly unable to meet high-performance, high-capacity Claim. So multi-core, ie multi-CPU (Central Processing
Unit, 中央处理器) 的技术应运而生, 并且不断发展、 成熟, 在市场中应用范围 迅速扩大, 多核技术取缔传统的单核技术已成为不可避免的趋势。  The technology of Unit, Central Processing Unit has emerged as the times require, and it has been continuously developed and matured. The scope of application in the market is rapidly expanding. Multi-core technology has become an inevitable trend in the elimination of traditional single-core technology.
[6] 多核内存管理技术是多核技术中的一种关键技术, 整个系统架构都依赖于它, 其性能的好坏直接影响到多核处理器的性能及其竞争力, 现有技术中的一种内 存管理方法为: 不支持内存在多核之间传递, 当多核之间进行通信吋, 需要对 内存内容进行多次复制。  [6] Multi-core memory management technology is a key technology in multi-core technology. The whole system architecture depends on it. Its performance directly affects the performance and competitiveness of multi-core processors. One of the prior technologies The memory management method is as follows: Memory is not supported between multiple cores. When communicating between multiple cores, it is necessary to copy the memory contents multiple times.
[7] 如图 1所示为该方案中两个 CPU之间进行通信吋的原理示意图, 具体处理流程 包括如下步骤:  [7] Figure 1 shows the schematic diagram of the communication between two CPUs in the solution. The specific processing flow includes the following steps:
[8] 步骤 1、 CPU1从自已的内存空间内申请内存块;  [8] Step 1. CPU1 applies for a memory block from its own memory space;
[9] 步骤 2、 CPU1构造数据包, 该数据包中包含 CPU1与 CPU2的通信内容;  [9] Step 2. CPU1 constructs a data packet, which contains the communication contents of CPU1 and CPU2;
[10] 步骤 3、 CPU1将上述数据包承载在申请的内存块中, 并将数据包发送到 CPU1 与 CPU2之间的通信线路上;  [10] Step 3. The CPU 1 carries the above data packet in the requested memory block, and sends the data packet to the communication line between the CPU 1 and the CPU 2;
[I I] 步骤 4、 CPU1释放上述申请的内存块, 以便内存块重复利用;  [I I] Step 4. CPU1 releases the memory block of the above application, so that the memory block is reused;
[12] 步骤 5、 上述数据包通过通信线路被传输到 CPU2; [12] Step 5. The above data packet is transmitted to the CPU 2 through the communication line;
[13] 步骤 6、 CPU2从自已的内存空间内申请内存块; [14] 步骤 7、 CPU2从通信线路上读取上述数据包, 并数据包存放到自己申请的内存 块内; [13] Step 6. CPU2 applies for a memory block from its own memory space; [14] Step 7. The CPU 2 reads the above data packet from the communication line, and the data packet is stored in the memory block applied by itself;
[15] 步骤 8、 CPU2处理上述数据包;  [15] Step 8. CPU2 processes the above data packet;
[16] 步骤 9、 CPU2处理上述数据包完毕, 释放申请的内存块, 通信结束。  [16] Step 9. After processing the above data packet, CPU2 releases the requested memory block and the communication ends.
[17] 发明内容 [17] Summary of the invention
[18] 本发明实施例提供了一种多核系统中共享内存的管理方法和装置, 可以支持共 享内存在各 CPU之间自由传递, 大大降低了共享内存访问冲突的机率, 有效提高 了多核系统的性能。  [18] The embodiment of the invention provides a method and a device for managing shared memory in a multi-core system, which can support shared memory to be freely transferred between CPUs, greatly reducing the probability of shared memory access conflicts, and effectively improving the multi-core system. performance.
[19] 本发明实施例提供了一种多核系统中共享内存的管理方法, 包括: [19] The embodiment of the present invention provides a method for managing shared memory in a multi-core system, including:
[20] 在多核系统中配置全局共享的内存和局部共享的内存; 其中, 所述多核系统中 的所有中央处理器 CPU都能够访问所述全局共享的内存, 所述多核系统中的部分[20] Configuring global shared memory and locally shared memory in a multi-core system; wherein all central processing CPUs in the multi-core system are capable of accessing the global shared memory, part of the multi-core system
CPU能够访问所述局部共享的内存; The CPU is capable of accessing the locally shared memory;
[21] 所述多核系统中的 CPU通过所述全局共享的内存和局部共享的内存来承载信息 [21] The CPU in the multi-core system carries information through the global shared memory and locally shared memory
[22] 本发明实施例还提供了一种多核系统中共享内存的管理装置, 包括: [22] The embodiment of the present invention further provides a management device for sharing memory in a multi-core system, including:
[23] 全局共享内存配置模块, 用于在多核系统中配置全局共享的内存, 所述多核系 统中的所有 CPU都能够访问所述全局共享的内存;  [23] a global shared memory configuration module, configured to configure global shared memory in a multi-core system, wherein all CPUs in the multi-core system can access the global shared memory;
[24] 局部共享内存配置模块, 用于在多核系统中配置局部共享的内存, 所述多核系 统中的部分 CPU能够访问所述局部共享的内存。 [24] A local shared memory configuration module, configured to configure locally shared memory in a multi-core system, wherein a portion of the CPUs in the multi-core system can access the locally shared memory.
[25] 由上述实施例所提供的技术方案可以看出, 通过在多核系统中配置全局共享的 内存和局部共享的内存。 可以支持共享内存在各 CPU之间自由传递, 从而大大降 低了共享内存访问冲突的机率, 有效提高了多核系统的性能。 [25] It can be seen from the technical solutions provided by the above embodiments that the global shared memory and the locally shared memory are configured in a multi-core system. It can support shared memory freely transfer between CPUs, which greatly reduces the probability of shared memory access conflicts and effectively improves the performance of multi-core systems.
[26] 附图简要说明  [26] BRIEF DESCRIPTION OF THE DRAWINGS
[27] 为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实施例中 所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本发 明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动的前提 下, 还可以根据这些附图获得其他的附图。  [27] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings to be used in the embodiments will be briefly described below. Obviously, the drawings in the following description are only the present drawings. Some embodiments of the invention may be obtained by those of ordinary skill in the art from the drawings without departing from the scope of the invention.
[28] 图 1为现有技术中一种两个 CPU之间进行通信的原理示意图; 图 2为本发明实施例一提供的一种多种共享方式并存的内存共享示意图; 图 3为本发明实施例一提供的通过内存映射实现的全局共享区和局部共享区的 划分原理示意图; [28] FIG. 1 is a schematic diagram of a principle of communication between two CPUs in the prior art; 2 is a schematic diagram of memory sharing in which multiple sharing modes coexist according to Embodiment 1 of the present invention; FIG. 3 is a schematic diagram of a principle of dividing a global shared area and a local shared area implemented by memory mapping according to Embodiment 1 of the present invention;
4为本发明实施例一提供的一种在多核间传递内存块的示意图; 4 is a schematic diagram of transferring a memory block between multiple cores according to Embodiment 1 of the present invention;
5为本发明实施例二提供的一种多种类型的共享内存的利用率示意图; 图 6为本发明实施例二提供的一种基于最小匹配原则的内存匹配处理流程图; 图 7为本发明实施例三提供的一种内存层面的多播技术原理示意图; 图 8为本发明实施例四提供的实现多核内存共享处理装置的结构示意图。 FIG 5 a schematic view of the utilization of a variety of types of shared memory according to a second embodiment of the invention; FIG. 6 one kind of memory according to a second embodiment of the matching processing based on the flowchart of the present invention, the minimum matching principle; Figure 7 is FIG. 8 is a schematic structural diagram of a multi-core memory sharing processing apparatus according to Embodiment 4 of the present invention.
实施本发明的方式  Mode for carrying out the invention
发明人在实现本发明过程中, 发现现有技术中至少存在如下问题: 由于内存不 能在多核间传递, 导致通信过程相当繁杂, 其间的内存申请、 释放开销也很大 ; 而且通信过程越复杂, 其开销就越大, 从而降低了系统性能, 不能满足多核 芯片、 多核操作系统等前沿技术的新需求。  In the process of implementing the present invention, the inventors have found that at least the following problems exist in the prior art: Since memory cannot be transferred between multiple cores, the communication process is quite complicated, and the memory application and release overhead are also large; and the more complicated the communication process is, The greater the overhead, the lower the system performance, and the new requirements of cutting-edge technologies such as multi-core chips and multi-core operating systems.
下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是全部 的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作出创造性劳 动前提下所获得的所有其他实施例, 都属于本发明保护的范围。  The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本发明实施例提出了多核间全局共享 (Global Shared) 、 局部共享 (Local
Figure imgf000005_0001
Embodiments of the present invention propose global sharing (Global Shared) and local sharing (Local)
Figure imgf000005_0001
Shared) 等多种共享方式并存的内存共享技术。 下面分别介绍上述各种共享方式  Shared) A memory sharing technique that coexists with multiple sharing methods. The following various sharing methods are introduced separately.
全局共享: 全局共享的内存从访问权限的角度考虑, 所有 CPU均可以访问; 局部共享: 局部共享的内存从访问权限的角度考虑, 仅有部分 CPU可以访问, 其它 CPU不能访问; Global sharing: Global shared memory is accessible from the perspective of access rights. Local sharing: Local shared memory From the perspective of access rights, only some CPUs can access, other CPUs cannot access;
全共享: 全共享的内存从操作权限的角度考虑, 访问的 CPU可完全控制; 半共享: 半共享的内存从操作权限的角度考虑, 访问的 CPU只有部分权限, 比 如可读但不能写, 可使用内存但不能申请内存等。  Full sharing: Fully shared memory from the perspective of operational rights, the access to the CPU can be fully controlled; semi-shared: semi-shared memory from the perspective of operational permissions, the access to the CPU only partial permissions, such as readable but not writeable, Use memory but cannot apply for memory, etc.
基于上述各种共享方式, 本发明实施例在多核系统中配置上述全局共享的内存 和局部共享的内存。 According to the foregoing various sharing manners, the embodiment of the present invention configures the above-mentioned global shared memory in a multi-core system. And locally shared memory.
[45] 并且, 在所述全局共享的内存中配置全局全共享和全局半共享的内存, 多核系 统中的所有 CPU都能够对所述全局全共享的内存进行完全控制, 多核系统中的部 分 CPU能够对所述全局半共享的内存进行完全控制, 而其它 CPU只能够对所述全 局半共享的内存进行部分控制。  [45] Moreover, global fully shared and global semi-shared memory is configured in the global shared memory, and all CPUs in the multi-core system can completely control the global fully shared memory, and part of the CPU in the multi-core system The global semi-shared memory can be fully controlled, while other CPUs can only partially control the global semi-shared memory.
[46] 并且, 在所述局部共享的内存中配置局部全共享和局部半共享的内存, 多核系 统中能够访问所述局部共享的内存的部分 CPU都能够对所述局部全共享的内存进 行完全控制, 能够访问所述局部共享的内存的部分 CPU中的特定 CPU, 能够对所 述局部半共享的内存进行完全控制。  [46] Also, local fully shared and locally semi-shared memory is configured in the locally shared memory, and a part of CPUs in the multi-core system capable of accessing the locally shared memory can completely complete the locally fully shared memory. Controlling, a particular CPU of a portion of the CPU capable of accessing the locally shared memory, is capable of full control of the locally semi-shared memory.
[47] 本发明实施例根据多核系统中的各种业务数据包的长度, 配置各种长度类型的 所述全局共享的内存和局部共享的内存。 当多核系统中存在多种类型的全局共 享的内存和 /或局部共享的内存能够用来承载同一种业务数据包吋, 选择长度最 小类型的全局共享的内存和 /或局部共享的内存中的空闲内存块来承载所述业务 数据包。  [47] Embodiments of the present invention configure the global shared memory and the locally shared memory of various length types according to the lengths of various service data packets in the multi-core system. When there are multiple types of global shared memory and/or locally shared memory in a multi-core system that can be used to carry the same type of service data packet, select the smallest shared type of global shared memory and/or the free memory in the locally shared memory. A memory block to carry the service data packet.
[48] 本发明实施例将承载业务数据包的全局共享的内存在各个 CPU之间进行传递, 由最后使用该全局共享的内存的 CPU将该全局共享的内存释放掉。 同吋, 将多播 数据包承载于所述全局共享的内存中, 将所述多播数据包的地址信息复制成多 份, 向各个目的 CPU分别发送该多份地址信息; 各个目的 CPU根据所述地址信息 [48] In the embodiment of the present invention, the global shared memory carrying the service data packet is transferred between the CPUs, and the global shared memory is released by the CPU that last uses the global shared memory. Simultaneously, the multicast data packet is carried in the global shared memory, the address information of the multicast data packet is copied into multiple copies, and the multiple address information is separately sent to each destination CPU; Address information
, 从所述全局共享的内存中获取所述业务数据包。 And obtaining the service data packet from the global shared memory.
[49] 下面结合附图来详细描述本发明实施例。  [00] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[50] 实施例一、 如图 2所示为本实施例一提供的多种共享方式并存的内存共享示意 图,  [50] Embodiment 1 is shown in FIG. 2, which is a schematic diagram of memory sharing in which multiple sharing modes are provided in the first embodiment.
该多种共享方式并存的原理是将内存共享区划分成若干个子区域, 并灵活设置 每个子区域的访问权限和读写权限, 以实现多种共享方式并存的目的。  The principle of coexistence of the multiple sharing modes is to divide the memory sharing area into several sub-areas, and flexibly set the access rights and read-write rights of each sub-area to achieve the purpose of coexistence of multiple sharing modes.
[51] 如图 2所示, 根据 CPU应用模型, 将共享内存划分成若干个全局共享区、 局部 共享区, 全局共享区和局部共享区的划分与各 CPU上业务分布有关。 全局共享区 允许所有 CPU访问, 局部共享区允许部分 (一个或几个) CPU访问, 各局部共享 区之间不能互相访问。 [52] 如图 2所示, 局部共享区 1只允许 CPU1和 CPU2访问, 局部共享区 m只允许 CPUn 访问, 全局共享区则允许所有 CPU (CPU 1 -CPUn) 访问。 因此, 通过将共享内 存区划分成全局共享区和局部共享区, 可以降低多 CPU竞争的可能性, 把原来的 所有 CPU竞争变成了部分 CPU竞争或者完全不竞争 (一个 CPU独享局部共享区) [51] As shown in FIG. 2, according to the CPU application model, the shared memory is divided into a plurality of global shared areas and local shared areas, and the division of the global shared area and the local shared area is related to the service distribution on each CPU. The global shared area allows all CPU access, and the local shared area allows partial (one or several) CPU access, and each local shared area cannot access each other. [52] As shown in Figure 2, local shared area 1 only allows CPU1 and CPU2 access, local shared area m only allows CPUn access, and global shared area allows all CPUs (CPU 1 - CPUn) to access. Therefore, by dividing the shared memory area into a global shared area and a local shared area, the possibility of multi-CPU competition can be reduced, and all the original CPU competitions become partial CPU competition or no competition at all (one CPU exclusive local shared area).
[53] 根据可访问内存区的各个 CPU的操作权限, 可以进一步将某一局部共享区或全 局共享区细分成全共享区和半共享区。 如图 2所示, 局部共享区 1的全共享区, C PU1和 CPU2都可完全控制, 而局部共享区 1的半共享区, CPU1只有部分操作权 限, CPU2可完全控制; 局部共享区 m的全共享区, CPUn可完全控制, 而局部共 享区 m的半共享区, CPUn只有部分操作权限; 全局共享区的全共享区, 所有 CP U均可完全控制, 而全局共享区的半共享区, CPUl~CPUn-l只有部分操作权限 , CPUn可完全控制。 [53] According to the operation authority of each CPU that can access the memory area, a certain local shared area or a global shared area can be further subdivided into a full shared area and a semi-shared area. As shown in Figure 2, the shared area of the local shared area 1, C PU1 and CPU2 can be fully controlled, and the semi-shared area of the local shared area 1, CPU1 has only partial operational rights, CPU2 can be fully controlled; local shared area m Full shared area, CPUn can be fully controlled, and the shared area m is a semi-shared area. CPUn has only partial operation rights; the shared area of the global shared area, all CP Us can be completely controlled, and the semi-shared area of the global shared area, CPU1~CPUn-l only have partial operation rights, and CPUn can be fully controlled.
[54] 因此, 通过将全局共享区或多 CPU均可访问的局部共享区划分成全共享区和半 共享区, 明确各个 CPU的操作权限, 可以进一步降低多 CPU竞争, 在半共享区内 , 各 CPU按照各自的权限进行操作, 仅允许一个 CPU有完全控制权限。  [54] Therefore, by dividing the global shared area or the local shared area accessible by multiple CPUs into a full shared area and a semi-shared area, and clarifying the operation authority of each CPU, the multi-CPU competition can be further reduced, in the semi-shared area, The CPU operates according to its own permissions, allowing only one CPU to have full control.
[55] 上述多种共享方式并存的方法可以适用于多核系统中的多种应用场景, 比如, 应用场景 1, 为各个 CPU分配独立的代码段和数据段, 各 CPU不互斥地访问自已 的数据段; 应用场景 2, 只允许一个 CPU修改心跳计数值, 其它 CPU只读取心跳 计数值。  [55] The foregoing methods for coexisting multiple sharing modes can be applied to multiple application scenarios in a multi-core system. For example, application scenario 1 allocates separate code segments and data segments for each CPU, and each CPU does not mutually exclusive access to its own. Data segment; Application scenario 2, only one CPU is allowed to modify the heartbeat count value, and other CPUs only read the heartbeat count value.
[56] 实施例一提供的通过内存映射实现的全局共享区和局部共享区的划分原理示意 图如图 3所示。  [56] The schematic diagram of the division principle of the global shared area and the local shared area implemented by the memory mapping provided in the first embodiment is shown in FIG. 3.
[57] 假设基于通用 MIPS (Microprocessor without Interlocked Pipeline  [57] Assume a generic MIPS (Microprocessor without Interlocked Pipeline)
Stages , 无内部互锁流水级的微处理器) 架构的某多核系统中有 32个 CPU, CPU 0负责控制维护业务, CPU1、 CPU2负责多播处理及 MAC层的消息收发, CPU3- CPU31能独立处理语音业务和数据业务。 由于各 CPU是独立工作的, 所以需要在 共享内存中划分 32个独立的代码段和数据段 (局部共享区) , 供各个 CPU处理业 务使用; 另外各个 CPU之间需要通信, 且内存需要在 CPU间传递, 因此, 还需要 在共享内存中划分一个多核通信段 (全局共享区) 。 [58] 在实施例一中, 全局共享区和局部共享区的划分可通过内存映射来实现, 该内 存映射是指虚拟地址到物理地址的一种转换关系。 在 MIPS架构的多核处理器中 , CPU是以虚拟地址访问内存的, 如图 3所示, 在各 CPU上, 将相同的虚拟地址 空间映射到不同的物理内存上, 可以实现局部共享区, 在 CPU0上, 访问的数据 段是实箭头所指部分; 在 CPU31上, 访问的数据段是虚箭头所指部分。 类似地, 在各 CPU上, 将相同的虚拟地址空间映射到同一片物理内存上, 可以实现全局共 享区, 如图 3中的多核通信段。 Stages, microprocessor without internal interlocking flow level) There are 32 CPUs in a multi-core system of the architecture. CPU 0 is responsible for controlling maintenance services. CPU1 and CPU2 are responsible for multicast processing and MAC layer messaging. CPU3-CPU31 can be independent. Handle voice and data services. Since each CPU works independently, it is necessary to divide 32 independent code segments and data segments (local shared areas) in the shared memory for each CPU to process the service; in addition, communication between the CPUs is required, and the memory needs to be in the CPU. Inter-pass, therefore, also need to divide a multi-core communication segment (global shared area) in the shared memory. [58] In the first embodiment, the division of the global shared area and the local shared area may be implemented by a memory mapping, where the memory mapping refers to a conversion relationship between a virtual address and a physical address. In the multi-core processor of the MIPS architecture, the CPU accesses the memory by using a virtual address. As shown in FIG. 3, on the CPU, the same virtual address space is mapped to different physical memory, and a local shared area can be realized. On CPU0, the accessed data segment is the portion indicated by the solid arrow; on the CPU 31, the accessed data segment is the portion indicated by the dashed arrow. Similarly, on each CPU, mapping the same virtual address space to the same physical memory can implement a global shared area, such as the multi-core communication segment in FIG.
[59] 各 CPU在访问各自的代码段和数据段吋, 是不需要互斥的, 这样就达到了尽可 能减少内存访问冲突的目的, 从而提高了多核系统性能。 多核处理器都可以提 供相关的硬件实现内存映射, 内存映射也可以由软件实现。  [59] Each CPU accesses its own code segment and data segment, and does not need to be mutually exclusive. This achieves the goal of reducing memory access conflicts as much as possible, thereby improving the performance of multi-core systems. Multi-core processors can provide relevant hardware implementation memory mapping, and memory mapping can also be implemented by software.
[60] 在多核系统中, 由于多核之间需要互相通信, 而且还要支持内存在多核间进行 传递, 那么动态内存池必须部署在全局共享区内, 这样所有 CPU均可以在动态内 存池中申请、 释放内存, 并且申请得到的内存对其它 CPU亦是可见的, 可以用来 在 CPU之间进行传递。  [60] In a multi-core system, since multiple cores need to communicate with each other and also support memory transfer between multiple cores, the dynamic memory pool must be deployed in the global shared area, so that all CPUs can apply in the dynamic memory pool. The memory is released, and the requested memory is also visible to other CPUs and can be used to transfer between CPUs.
[61] 实施例一提供的一种在多核间传递内存块的示意图如图 4所示。  [61] A schematic diagram of a memory block transferred between multiple cores according to Embodiment 1 is shown in FIG.
[62] 如图 4所示, 在全局共享区内, 以软件的方法, 为每个 CPU建立一个私有内存 池, 这里的私有是相对的, 并不是其它 CPU不能访问, 而是指该私有内存池的所 有者可以从中申请、 释放内存, 而其它 CPU只能使用并释放, 但没有申请权限, 因此, 该私有内存池为半共享内存区。 同吋, 考虑到如果为每个 CPU都建立私有 内存池所需要的内存较多, 而且在业务流量突发的情况下, 存在资源不足的风 险。 因此, 在全局共享区内, 再建立一个公共内存池, 该公共内存池为全共享 区。  [62] As shown in FIG. 4, in the global shared area, a private memory pool is established for each CPU in a software manner, where the private is relative, not other CPUs cannot access, but refers to the private memory. The owner of the pool can apply for and release memory, while other CPUs can only use and release, but do not apply for permission. Therefore, the private memory pool is a semi-shared memory area. Peer, considering that if you need to create a private memory pool for each CPU, you need more memory, and in the case of sudden traffic, there is a risk of insufficient resources. Therefore, in the global shared area, a common memory pool is created, which is a full shared area.
[63] 私有内存池和公共内存池设置为多大才能达到资源和效率之间的平衡点, 在实 际应用中, 可以釆用一种近似原则: 设置在正常业务情况下, 约 80%以上的内存 操作发生在私有内存池内。 具体配置可以根据实际业务模型进行调整。  [63] How much private memory pool and common memory pool are set to achieve a balance between resources and efficiency. In practice, an approximation principle can be used: Set up about 80% of memory under normal business conditions. The operation takes place in a private memory pool. The specific configuration can be adjusted according to the actual business model.
[64] 在上述全共享与半共享相结合的内存共享方式下, 大部分情况下, CPU可以在 自己的私有内存池里申请内存, 只有在少数情况下, 才会去公共内存池申请内 存, 因此, 多 CPU同吋申请内存的冲突会变得很小, 达到了本发明降低共享内存 访问冲突的目的。 [64] In the above-mentioned memory sharing mode of full sharing and semi-sharing, in most cases, the CPU can apply for memory in its own private memory pool, and only in a few cases, will it apply for memory in the public memory pool. Therefore, the conflict of multiple CPU peers applying for memory will become very small, and the invention reduces the shared memory. The purpose of the access conflict.
[65] 由于多核通信段位于全局共享区, 所有 CPU均可访问该区域, 而且各 CPU的私 有内存池中的内存块可以在多核间任意传递, 并釆用终点释放原则, 由最后使 用内存块的 CPU将内存块释放回最先申请该内存块的 CPU。 如图 4所示, CPU0申 请的内存块可以在其它 CPU间传递, 并由最后使用内存块的 CPU (CPU1) 将内 存块释放回 CPU0的私有内存池。 利用上述多核间传递内存块的方法可以实现多 核间通信 0拷贝, 避免了通信内容多次拷贝。  [65] Since the multi-core communication segment is located in the global shared area, all CPUs can access the area, and the memory blocks in the private memory pool of each CPU can be arbitrarily transferred between the multi-cores, and the end-release principle is adopted, and the last used memory block is used. The CPU releases the memory block back to the CPU that first applied for the memory block. As shown in Figure 4, the memory block requested by CPU0 can be transferred between other CPUs, and the CPU (CPU1) that last used the memory block releases the memory block back to CPU0's private memory pool. The above method of transferring memory blocks between multiple cores can realize 0 copies of communication between multiple cores, thereby avoiding multiple copies of communication contents.
[66] 实施例二, 该实施例提供了多核系统中共享内存类型多样化设计, 能根据具体 的业务需求, 配置相应的内存类型和内存块数量, 自动选择合适的内存以承载 、 传递业务数据, 提高内存利用率。  [Embodiment 2] This embodiment provides a diversified design of a shared memory type in a multi-core system, and can configure a corresponding memory type and a number of memory blocks according to specific service requirements, and automatically select an appropriate memory to carry and transmit service data. , improve memory utilization.
[67] 假设多核系统中有多种业务类型, 每种业务的数据包长度不等, 其中最大的数 据包长度为 1024字节, 那么可以将共享内存配置成 32字节、 64字节、 128字节、 256字节、 512字节、 1024字节等多种类型, 并按照实际业务模型, 为各种类型 的内存分配一定数量的内存块, 形成内存池。 比如, 如果 128字节〜 512字节的 数据包数量占总流量的 50%以上, 那么就为 128字节、 256字节、 512字节的内存 多分配一些内存空间, 为其它类型的内存少分配一些内存空间。  [67] Assuming that there are multiple service types in a multi-core system, each service has a different packet length, and the largest packet length is 1024 bytes. Then the shared memory can be configured to be 32 bytes, 64 bytes, 128. Bytes, 256 bytes, 512 bytes, 1024 bytes, etc., and according to the actual business model, allocate a certain number of memory blocks for various types of memory to form a memory pool. For example, if the number of packets of 128 bytes to 512 bytes accounts for more than 50% of the total traffic, then allocate more memory space for 128 bytes, 256 bytes, and 512 bytes of memory, which is less for other types of memory. Allocate some memory space.
[68] 该实施例二提供的一种多种类型的共享内存的利用率示意图如图 5所示, 如图 5 所示, 30字节的数据包占 20% , 500字节的数据包占 70% , 1024字节的数据包占 1 0% , 相应的内存利用率为 93.75%, 97.66% , 93.75% , 加权内存利用率为 (20%*9 3.75% + 70 *97.66 + 10%* 100%) =  [68] A schematic diagram of utilization of multiple types of shared memory provided in the second embodiment is shown in FIG. 5. As shown in FIG. 5, a 30-byte packet accounts for 20%, and a 500-byte packet accounts for 70%, 1024 bytes of data packets accounted for 10%, the corresponding memory utilization rate was 93.75%, 97.66%, 93.75%, and the weighted memory utilization rate was (20%*9 3.75% + 70 *97.66 + 10%* 100 %) =
97.112% , 由此可见, 相对于单一的内存类型来说, 内存利用率大大提高了。  97.112%, it can be seen that memory utilization is greatly improved compared to a single memory type.
[69] 实施例二提供的一种基于最小匹配原则的内存匹配处理流程图如图 6所示。 对 于不同的业务类型, 通过"最小匹配原则"快速选择适合的内存类型, 具体处理过 程如下: [69] A flow matching processing flowchart based on the minimum matching principle provided in the second embodiment is shown in FIG. 6. For different service types, quickly select the appropriate memory type through the "Minimum Matching Principle". The specific processing is as follows:
[70] 在开始选择内存吋, 首先判断系统中是否存在与业务数据包匹配的内存, 当判 断系统中存在多种类型的内存都与业务数据包匹配吋, 选择长度最小的第一内 存类型来承载该业务数据包。 然后, 继续判断该第一内存类型中是否存在空闲 的内存块, 如果是, 选择其中空闲的内存块, 内存匹配处理流程结束; 否则, 继续选择与业务数据包匹配的长度第二小的第二内存类型, 并继续判断该第二 内存类型中是否存在空闲的内存块。 重复继续上述处理, 直到选择到空闲的内 存块来承载该业务数据包。 [70] After selecting memory, first determine whether there is memory matching the service data packet in the system. When it is judged that there are multiple types of memory in the system that match the service data packet, select the first memory type with the smallest length. The service data packet is carried. Then, it is further determined whether there is a free memory block in the first memory type, and if yes, selecting a memory block in which the memory block is idle, the memory matching processing flow ends; otherwise, The second memory type of the second smallest length matching the service data packet is continuously selected, and it is continuously determined whether there is a free memory block in the second memory type. The above process is repeated until the free memory block is selected to carry the service data packet.
[71] 例如, 业务数据包长度为 500字节, 系统中有 512字节、 1024字节的两种类型的 内存可以用于承载该业务数据包, 根据"最小匹配原则", 首先选择 512字节的内 存, 如果该 512字节的内存没有相应的空闲内存块, 则进一步选择 1024字节的内 存。 [71] For example, the service data packet length is 500 bytes. There are two types of memory in the system: 512 bytes and 1024 bytes, which can be used to carry the service data packet. According to the "minimum matching principle", first select 512 words. Section memory, if the 512-byte memory does not have a corresponding free memory block, further select 1024 bytes of memory.
[72] 实施例三, 该实施例提供的一种内存层面的多播技术原理示意图如图 7所示。  [72] Embodiment 3 is a schematic diagram of a memory level multicast technology provided in this embodiment.
该实施例基于多核间内存共享, 提出了内存层面的多播技术, 具体处理过程如 下: 在共享内存区划分吋, 为支持多播功能的 CPU开辟一个或多个专用的多播池 , 多播池中存放一定数量的多播消息块, 比如 4096个, 具体数量依据多播业务 的多少而定, 每个多播消息块包括多播包地址、 大小域及多播控制域 (如多播
Figure imgf000010_0001
This embodiment is based on memory sharing between multiple cores, and proposes a multicast technology at the memory level. The specific processing process is as follows: After sharing the shared memory area, one or more dedicated multicast pools are opened for the CPU supporting the multicast function, and multicasting is performed. A certain number of multicast message blocks are stored in the pool, such as 4096. The specific quantity depends on the number of multicast services. Each multicast message block includes a multicast packet address, a size domain, and a multicast control domain (such as multicast).
Figure imgf000010_0001
[73] 在多核间进行数据包多播吋, 不复制多播数据包, 而通过消息通道将多播数据 包的信息 (包括地址及其大小) 传递到目的地, 由目的 CPU根据多播数据包的信 息获得多播数据包并进行处理。  [73] After multicasting between multiple cores, the multicast packets are not copied, but the information of the multicast packets (including the address and its size) is transmitted to the destination through the message channel, and the destination CPU is based on the multicast data. The packet information is obtained and processed.
[74] 如图 7所示, CPU1收到一个多播数据包, 将该多播数据包存放在全局共享区的 内存中。 然后, CPU1访问专用的多播池, 申请并构造多播消息包 (多播消息块 中包含多播数据包的存放地址及其大小等信息) , 并将构造好的多播消息包依 次传递到各个目的 CPU。 接着, 各个目的 CPU根据多播消息包中的信息解析多播 数据包的存放地址及其大小, 根据该存放地址获取多播数据包, 对多播包进行 相应的处理。 在上述处理过程中, 始终只有一份多播数据包, 从而避免了多播 过程中复制多播数据包的环节, 提高了多播处理效率。  [74] As shown in Figure 7, CPU1 receives a multicast packet and stores the multicast packet in the memory of the global shared area. Then, the CPU 1 accesses the dedicated multicast pool, requests and constructs a multicast message packet (the multicast message block contains information such as the storage address and size of the multicast data packet), and transmits the constructed multicast message packet to the CPU for each purpose. Then, each destination CPU parses the storage address and the size of the multicast data packet according to the information in the multicast message packet, acquires the multicast data packet according to the storage address, and performs corresponding processing on the multicast packet. In the above process, there is always only one multicast packet, which avoids the process of copying the multicast packet during the multicast process, and improves the multicast processing efficiency.
[75] 实施例四、 该实施例提出的实现多核内存共享的处理装置的结构示意图如图 8 所示, 包括如下模块:  [75] Embodiment 4 is a schematic structural diagram of a processing device for implementing multi-core memory sharing proposed in this embodiment, as shown in FIG. 8, and includes the following modules:
[76] 全局共享内存配置模块, 用于在多核系统中配置全局共享的内存, 多核系统中 的所有 CPU都能够访问所述全局共享的内存; 包括: 全局全共享内存配置模块、 全局半共享内存配置模块。 [77] 局部共享内存配置模块, 用于在多核系统中配置局部共享的内存, 多核系统中 的部分 CPU能够访问所述局部共享的内存。 包括: 局部全共享内存配置模块、 局 部半共享内存配置模块。 [76] The global shared memory configuration module is configured to configure global shared memory in a multi-core system, and all CPUs in the multi-core system can access the global shared memory; including: a global fully shared memory configuration module, global semi-shared memory Configure the module. [77] A local shared memory configuration module, configured to configure locally shared memory in a multi-core system, and a portion of CPUs in the multi-core system can access the locally shared memory. Including: local full shared memory configuration module, local semi-shared memory configuration module.
[78] 内存映射模块, 用于将各个 CPU的虚拟地址空间映射到同一个物理地址空间, 为各个 CPU配置所述全局共享的内存; 将各个 CPU的虚拟地址空间映射到不同的 物理地址空间, 为各个 CPU配置所述局部共享的内存。  [78] a memory mapping module, configured to map virtual address spaces of respective CPUs to the same physical address space, configure the global shared memory for each CPU; map virtual address spaces of the respective CPUs to different physical address spaces, The locally shared memory is configured for each CPU.
[79] 内存类型配置模块, 用于根据各种业务数据包的长度, 配置对应的各种长度类 型的所述全局共享的内存和 /或所述局部共享的内存。  [79] The memory type configuration module is configured to configure, according to the length of the various service data packets, the global shared memory of the respective length types and/or the locally shared memory.
[80] 内存匹配处理模块, 用于当多核系统中存在多种类型的所述全局共享的内存和 /或所述局部共享的内存能够承载同一种业务数据包吋, 选择长度最小的类型的 所述全局共享的内存或所述局部共享的内存中的空闲内存块来承载所述业务数 据包。  [80] a memory matching processing module, configured to: when there are multiple types of the global shared memory in the multi-core system, and/or the locally shared memory can carry the same type of service data packet, and select the type of the smallest length The global shared memory or the free memory block in the locally shared memory to carry the service data packet.
[81] 内存传递模块, 用于将承载业务数据包的所述全局共享的内存在各个 CPU之间 进行传递, 由最后使用所述全局共享的内存的 CPU将所述全局共享的内存释放掉  [81] a memory delivery module, configured to transfer the global shared memory carrying the service data packet between the CPUs, and release the global shared memory by a CPU that last uses the global shared memory
[82] 多播数据包处理模块, 用于将多播数据包承载于全局共享的内存中, 将所述多 播数据包的地址信息复制多份, 向多个目的 CPU分别发送多份所述多播数据包的 地址信息, 所述多个目的 CPU根据所述地址信息, 从所述全局共享的内存中获取 所述多播数据包。 [82] a multicast packet processing module, configured to carry the multicast data packet in a global shared memory, copy the address information of the multicast data packet into multiple copies, and send multiple copies to the plurality of destination CPUs. Address information of the multicast data packet, the plurality of destination CPUs acquiring the multicast data packet from the global shared memory according to the address information.
[83] 上述全局共享内存配置模块中的全局全共享内存配置模块, 用于在所述全局共 享的内存中配置全局全共享的内存, 多核系统中的所有 CPU都能够对所述全局全 共享的内存进行完全控制;  [83] The global shared memory configuration module in the global shared memory configuration module is configured to configure global fully shared memory in the global shared memory, and all CPUs in the multi-core system can be fully shared by the global Full control of the memory;
[84] 上述全局共享内存配置模块中的全局半共享内存配置模块, 用于在所述全局共 享的内存中配置全局半共享的内存, 多核系统中的部分 CPU能够对所述全局半共 享的内存进行完全控制, 而其它 CPU只能够对所述全局半共享的内存进行部分控 制。  [84] The global semi-shared memory configuration module in the global shared memory configuration module is configured to configure global semi-shared memory in the global shared memory, and part of the CPU in the multi-core system can access the global semi-shared memory. Full control is performed, while other CPUs are only able to partially control the global semi-shared memory.
[85] 上述局部共享内存配置模块中的局部全共享内存配置模块, 用于在所述局部共 享的内存中配置局部全共享的内存, 多核系统中的能够访问所述局部共享的内 存的部分 CPU都能够对所述局部全共享的内存进行完全控制; [85] The local shared memory configuration module in the local shared memory configuration module is configured to configure locally fully shared memory in the locally shared memory, and the multi-core system can access the local shared The stored part of the CPU is capable of completely controlling the locally fully shared memory;
[86] 上述局部共享内存配置模块中的局部半共享内存配置模块, 用于在所述局部共 享的内存中配置局部半共享的内存, 多核系统中的能够访问所述局部共享的内 存的部分 CPU中的特定 CPU, 能够对所述局部半共享的内存进行完全控制。 [86] The local semi-shared memory configuration module in the local shared memory configuration module is configured to configure local semi-shared memory in the locally shared memory, and a part of the CPU in the multi-core system capable of accessing the locally shared memory The specific CPU in the middle can fully control the local semi-shared memory.
[87] 值得注意的是, 上述装置实施例中, 所包括的各个单元只是按照功能逻辑进行 划分的, 但并不局限于上述的划分, 只要能够实现相应的功能即可; 另外, 各 功能单元的具体名称也只是为了便于相互区分, 并不用于限制本发明的保护范 围。 [87] It should be noted that, in the above device embodiment, each unit included is only divided according to functional logic, but is not limited to the above division, as long as the corresponding function can be implemented; The specific names are also for convenience of distinguishing from each other and are not intended to limit the scope of the present invention.
[88] 另外, 本领域技术人员可以理解, 本发明实施例所提供的方法中, 其全部或部 分步骤是可以通过程序指令相关的硬件来完成。 比如可以通过计算机运行程来 完成。 该程序可以存储在可读取存储介质, 例如随机存储器、 磁盘、 光盘等。  In addition, those skilled in the art can understand that all or part of the steps of the method provided by the embodiments of the present invention can be completed by using hardware related to program instructions. For example, it can be done by computer running. The program can be stored on a readable storage medium such as a random access memory, a magnetic disk, an optical disk, or the like.
[89] 综上所述, 本发明实施例支持共享内存在各 CPU之间自由传递, 支持在各 CPU 上灵活配置内存共享方式, 实现了多种内存共享方式并存。 从而可以简化多核 间通信的过程, 大大降低共享内存访问冲突的机率, 有利于提高多核系统性能 , 并能实现多核通信吋 0拷贝; 同吋本发明实施例釆用内存类型多样化设计, 可 以提高内存利用率, 降低了开发成本, 并实现了多核间内存层面的多播技术, 提高了多播处理效率, 有利于提高多核系统性能。  [89] In summary, the embodiment of the present invention supports shared memory freely transferred between CPUs, and supports flexible allocation of memory sharing modes on each CPU, thereby realizing multiple memory sharing modes. Therefore, the process of communication between the multi-cores can be simplified, the probability of the shared memory access conflict is greatly reduced, the performance of the multi-core system is improved, and the multi-core communication 拷贝 0 copy can be realized. In the embodiment of the present invention, the memory type is diversified and can be improved. Memory utilization reduces development costs and implements multi-core memory-level multicast technology, which improves multicast processing efficiency and helps improve multi-core system performance.
[90] 以上所述, 仅为本发明较佳的具体实施方式, 但本发明的保护范围并不局限于 此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易想到 的变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护范围 应该以权利要求的保护范围为准。  The above description is only a preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of within the technical scope disclosed by the present invention. Changes or substitutions are intended to be included within the scope of the invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

权利要求书 Claim
[1] 一种多核系统中共享内存的管理方法, 其特征在于, 包括:  [1] A method for managing shared memory in a multi-core system, comprising:
在多核系统中配置全局共享的内存和局部共享的内存; 其中, 所述多核系 统中的所有中央处理器 CPU都能够访问所述全局共享的内存, 所述多核系 统中的部分 CPU能够访问所述局部共享的内存;  Configuring global shared memory and locally shared memory in a multi-core system; wherein all central processing units in the multi-core system are capable of accessing the global shared memory, and some CPUs in the multi-core system are capable of accessing the Locally shared memory;
所述多核系统中的 CPU通过所述全局共享的内存和局部共享的内存来承载 The CPU in the multi-core system is carried by the global shared memory and the locally shared memory
Ι π Λ∑!、。 Ι π Λ∑! ,.
[2] 根据权利要求 1所述的方法, 其特征在于, 所述在多核系统中配置全局共享 的内存和局部共享的内存, 具体包括:  [2] The method according to claim 1, wherein the configuring the global shared memory and the locally shared memory in the multi-core system comprises:
将多核系统中的各个 CPU的虚拟地址空间映射到同一个物理地址空间, 为 各个 CPU配置所述全局共享的内存;  Mapping the virtual address space of each CPU in the multi-core system to the same physical address space, and configuring the global shared memory for each CPU;
将多核系统中的各个 CPU的虚拟地址空间映射到不同的物理地址空间, 为 各个 CPU配置所述局部共享的内存。  The virtual address space of each CPU in the multi-core system is mapped to a different physical address space, and the locally shared memory is configured for each CPU.
[3] 根据权利要求 1所述的方法, 其特征在于, 所述在多核系统中配置全局共享 的内存和局部共享的内存, 具体包括: [3] The method according to claim 1, wherein the configuring the global shared memory and the locally shared memory in the multi-core system comprises:
根据多核系统中各种业务数据包的长度, 配置各种长度类型的全局共享的 内存和局部共享的内存。  According to the length of various service data packets in a multi-core system, global shared memory and locally shared memory of various length types are configured.
[4] 根据权利要求 1所述的方法, 其特征在于:  [4] The method of claim 1 wherein:
所述全局共享的内存中包括: 全局全共享的内存和全局半共享的内存; 其中, 所述多核系统中的所有 CPU都能够对所述全局全共享的内存进行完 全控制; 所述多核系统中的部分 CPU能够对所述全局半共享的内存进行完 全控制, 而其它 CPU只能够对所述全局半共享的内存进行部分控制。  The global shared memory includes: globally shared memory and global semi-shared memory; wherein, all CPUs in the multi-core system are capable of completely controlling the globally-shared memory; in the multi-core system Part of the CPU can fully control the global semi-shared memory, while other CPUs can only partially control the global semi-shared memory.
[5] 根据权利要求 1所述的方法, 其特征在于:  [5] The method according to claim 1, wherein:
所述局部共享的内存中包括: 局部全共享的内存和局部半共享的内存; 其中, 所述多核系统中能够访问所述局部共享的内存的部分 CPU都能够对 所述局部全共享的内存进行完全控制; 所述多核系统中能够访问所述局部 共享的内存的部分 CPU中的特定 CPU, 能够对所述局部半共享的内存进行 完全控制。 The partially shared memory includes: a locally fully shared memory and a locally semi-shared memory; wherein, a part of the CPU in the multi-core system capable of accessing the locally shared memory is capable of performing the locally fully shared memory Full control; a specific CPU in a portion of the CPUs of the multi-core system capable of accessing the locally shared memory is capable of full control of the locally semi-shared memory.
[6] 根据权利要求 1至 5任一项所述的方法, 其特征在于, 所述方法还包括: 当所述多核系统中存在多种类型的全局共享的内存和 /或局部共享的内存能 够用来承载同一种业务数据包吋, 选择长度最小类型的全局共享的内存和 / 或局部共享的内存中的空闲内存块来承载所述业务数据包。 [6] The method according to any one of claims 1 to 5, wherein the method further comprises: when there are multiple types of global shared memory and/or locally shared memory in the multi-core system The same type of service data packet is used to carry the global shared memory of the smallest type and/or the free memory block in the locally shared memory to carry the service data packet.
[7] 根据权利要求 6所述的方法, 其特征在于, 所述方法还包括:  [7] The method according to claim 6, wherein the method further comprises:
将承载所述业务数据包的全局共享的内存在各个 CPU之间进行传递, 并由 最后使用所述全局共享的内存的 CPU将该全局共享的内存释放掉。  The global shared memory carrying the service data packet is transferred between the CPUs, and the global shared memory is released by the CPU that last uses the global shared memory.
[8] 根据权利要求 6所述的方法, 其特征在于, 所述方法还包括:  [8] The method according to claim 6, wherein the method further comprises:
将多播数据包承载于所述全局共享的内存中, 并将所述多播数据包的地址 信息复制多份, 向各个目的 CPU分别发送该地址信息;  The multicast data packet is carried in the global shared memory, and the address information of the multicast data packet is copied into multiple copies, and the address information is separately sent to each destination CPU;
所述各个目的 CPU根据所接收到的地址信息, 从所述全局共享的内存中获 取所述多播数据包。  And each of the destination CPUs obtains the multicast data packet from the global shared memory according to the received address information.
[9] 一种多核系统中共享内存的管理装置, 其特征在于, 包括:  [9] A management device for shared memory in a multi-core system, comprising:
全局共享内存配置模块, 用于在多核系统中配置全局共享的内存, 所述多 核系统中的所有 CPU都能够访问所述全局共享的内存;  a global shared memory configuration module, configured to configure global shared memory in a multi-core system, wherein all CPUs in the multi-core system can access the global shared memory;
局部共享内存配置模块, 用于在多核系统中配置局部共享的内存, 所述多 核系统中的部分 CPU能够访问所述局部共享的内存。  A local shared memory configuration module is configured to configure locally shared memory in a multi-core system, and a portion of the CPUs in the multi-core system can access the locally shared memory.
[10] 根据权利要求 9所述的装置, 其特征在于, 还包括:  [10] The device according to claim 9, further comprising:
内存映射模块, 用于将各个 CPU的虚拟地址空间映射到同一个物理地址空 间, 为各个 CPU配置所述全局共享的内存; 并将各个 CPU的虚拟地址空间 映射到不同的物理地址空间, 为各个 CPU配置所述局部共享的内存。  a memory mapping module, configured to map virtual address spaces of the CPUs to the same physical address space, configure the global shared memory for each CPU, and map virtual address spaces of the CPUs to different physical address spaces, The CPU configures the locally shared memory.
[11] 根据权利要求 9所述的装置, 其特征在于, 还包括:  [11] The device according to claim 9, further comprising:
内存类型配置模块, 用于根据各种业务数据包的长度, 配置对应各种长度 类型的全局共享的内存和 /或局部共享的内存。  The memory type configuration module is configured to configure global shared memory and/or locally shared memory of various length types according to lengths of various service data packets.
[12] 根据权利要求 9所述的装置, 其特征在于, 所述全局共享内存配置模块具体 包括:  [12] The device according to claim 9, wherein the global shared memory configuration module specifically includes:
全局全共享内存配置模块, 用于在所述全局共享的内存中配置全局全共享 的内存, 所述多核系统中的所有 CPU都能够对所述全局全共享的内存进行 完全控制; a global fully shared memory configuration module, configured to configure global fully shared memory in the global shared memory, where all CPUs in the multi-core system can perform the global fully shared memory fully control;
全局半共享内存配置模块, 用于在所述全局共享的内存中配置全局半共享 的内存, 所述多核系统中的部分 CPU能够对所述全局半共享的内存进行完 全控制, 而其它 CPU只能够对所述全局半共享的内存进行部分控制。  a global semi-shared memory configuration module, configured to configure global semi-shared memory in the global shared memory, wherein a part of the CPUs in the multi-core system can completely control the global semi-shared memory, and other CPUs can only Partial control of the global semi-shared memory.
[13] 根据权利要求 9所述的装置, 其特征在于, 所述局部共享内存配置模块具体 包括: [13] The apparatus according to claim 9, wherein the local shared memory configuration module specifically includes:
局部全共享内存配置模块, 用于在所述局部共享的内存中配置局部全共享 的内存, 所述多核系统中能够访问所述局部共享的内存的部分 CPU都能够 对所述局部全共享的内存进行完全控制;  a local full shared memory configuration module, configured to configure locally fully shared memory in the locally shared memory, where a part of the CPU capable of accessing the locally shared memory in the multi-core system is capable of accessing the locally shared memory Full control;
局部半共享内存配置模块, 用于在所述局部共享的内存中配置局部半共享 的内存, 所述多核系统中能够访问所述局部共享的内存的部分 CPU中的特 定 CPU, 能够对所述局部半共享的内存进行完全控制。  a local semi-shared memory configuration module, configured to configure local semi-shared memory in the locally shared memory, wherein a specific CPU of the partial CPU capable of accessing the locally shared memory in the multi-core system can Semi-shared memory for full control.
[14] 根据权利要求 9至 13任一项所述的装置, 其特征在于, 还包括: [14] The device according to any one of claims 9 to 13, further comprising:
内存匹配处理模块, 用于当所述多核系统中存在多种类型的全局共享的内 存和 /或局部共享的内存能够用来承载同一种业务数据包吋, 选择长度最小 类型的全局共享的内存或局部共享的内存中的空闲内存块来承载所述业务 数据包。  a memory matching processing module, configured to: when there are multiple types of global shared memory and/or locally shared memory in the multi-core system, can be used to carry the same type of service data packet, select a minimum-type type of global shared memory or A free memory block in the locally shared memory to carry the service data packet.
[15] 根据权利要求 14所述的装置, 其特征在于, 还包括:  [15] The device according to claim 14, further comprising:
内存传递模块, 用于将承载业务数据包的所述全局共享的内存在各个 CPU 之间进行传递, 并由最后使用所述全局共享的内存的 CPU将该全局共享的 内存释放掉。  The memory delivery module is configured to transfer the global shared memory carrying the service data packet between the CPUs, and release the global shared memory by the CPU that last uses the global shared memory.
[16] 根据权利要求 14所述的装置, 其特征在于, 还包括:  [16] The device according to claim 14, further comprising:
多播数据包处理模块, 用于将多播数据包承载于所述全局共享的内存中, 并将所述多播数据包的地址信息复制多份, 向多个目的 CPU分别发送该地 址信息; 所述多个目的 CPU根据所接收到的地址信息, 从所述全局共享的 内存中获取所述多播数据包。  a multicast packet processing module, configured to carry the multicast data packet in the global shared memory, and copy the address information of the multicast data packet into multiple copies, and separately send the address information to multiple destination CPUs; The plurality of destination CPUs acquire the multicast data packet from the global shared memory according to the received address information.
PCT/CN2008/073148 2007-11-29 2008-11-21 Management method and device of shared memory in multi-core system WO2009067950A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200710178405.4 2007-11-29
CN2007101784054A CN101246466B (en) 2007-11-29 2007-11-29 Management method and device for sharing internal memory in multi-core system

Publications (1)

Publication Number Publication Date
WO2009067950A1 true WO2009067950A1 (en) 2009-06-04

Family

ID=39946926

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2008/073148 WO2009067950A1 (en) 2007-11-29 2008-11-21 Management method and device of shared memory in multi-core system

Country Status (2)

Country Link
CN (1) CN101246466B (en)
WO (1) WO2009067950A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102117241A (en) * 2009-12-30 2011-07-06 华为技术有限公司 Multi-core system debugging method and multi-core system
CN102547146A (en) * 2010-12-29 2012-07-04 新奥特(北京)视频技术有限公司 System and method for interacting subtitle data
CN103019809A (en) * 2011-09-28 2013-04-03 中国移动通信集团公司 Business processing device and method, and business processing control device
CN111800353A (en) * 2020-06-30 2020-10-20 翱捷科技股份有限公司 Method and device for zero copy of memory of embedded system
CN112486704A (en) * 2020-11-27 2021-03-12 中船重工(武汉)凌久电子有限责任公司 Multi-core multiprocessor synchronization and communication system based on shared storage
CN112612623A (en) * 2020-12-25 2021-04-06 苏州浪潮智能科技有限公司 Method and equipment for managing shared memory

Families Citing this family (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101246466B (en) * 2007-11-29 2012-06-20 华为技术有限公司 Management method and device for sharing internal memory in multi-core system
CN101770403B (en) * 2008-12-30 2012-07-25 北京天融信网络安全技术有限公司 Method for controlling system configuration concurrency and synchronization on multi-core platform
CN102110196B (en) * 2009-12-25 2015-04-29 中国长城计算机深圳股份有限公司 Method and system for safely transmitting data among parallel-running multiple user operating systems
CN102955817A (en) * 2011-08-30 2013-03-06 腾讯数码(深圳)有限公司 Object management and recovery method and system based on shared memory
CN102508738B (en) * 2011-10-14 2014-02-19 北京华为数字技术有限公司 Backup method of service information of multi-core processor, inner core and backup inner core
CN103870333B (en) 2012-12-17 2017-08-29 华为技术有限公司 A kind of global memory's sharing method, device and a kind of communication system
CN103136110B (en) * 2013-02-18 2016-03-30 华为技术有限公司 EMS memory management process, memory management device and NUMA system
CN104123265B (en) * 2013-04-26 2017-12-22 华为技术有限公司 A kind of many communication method between cores and system
CN105487933A (en) * 2015-11-24 2016-04-13 无锡江南计算技术研究所 Inter-kernel asynchronous message queue and shared memory based inter-domain communication method
DE102016222691A1 (en) * 2015-12-15 2017-06-22 Continental Teves Ag & Co. Ohg Microcontroller system and method for controlling memory accesses in a microcontroller system
CN106899545B (en) * 2015-12-18 2019-10-18 联芯科技有限公司 A kind of system and method for terminal security communication
CN107341076B (en) * 2016-04-29 2020-08-28 展讯通信(上海)有限公司 Fault auxiliary positioning method and device for communication processor and terminal
CN108628676A (en) * 2017-03-16 2018-10-09 哈尔滨英赛克信息技术有限公司 A kind of memory management device and method towards multiple nucleus system
EP3695316A1 (en) * 2017-10-17 2020-08-19 Huawei Technologies Co., Ltd. Computing system for unified memory access
CN109783220B (en) * 2017-11-10 2020-12-11 安徽寒武纪信息科技有限公司 Memory allocation method, device, computer system and storage medium
CN108829631A (en) * 2018-04-27 2018-11-16 江苏华存电子科技有限公司 A kind of approaches to IM promoting multi-core processor
CN109462587B (en) * 2018-11-09 2020-03-27 四川虹微技术有限公司 Block chain layered consensus method, block chain network system and block chain node
WO2021035609A1 (en) * 2019-08-29 2021-03-04 深圳市大疆创新科技有限公司 Interaction method, device and system, and readable storage medium
CN115485673A (en) * 2020-08-03 2022-12-16 Oppo广东移动通信有限公司 Shared memory processing apparatus, modem, method, and storage medium
CN112905522A (en) * 2021-02-22 2021-06-04 深圳市显控科技股份有限公司 Multi-core shared starting system, control method thereof and storage medium
CN117573583A (en) * 2024-01-12 2024-02-20 上海励驰半导体有限公司 Data processing method, device, chip and traffic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1758229A (en) * 2005-10-28 2006-04-12 中国人民解放军国防科学技术大学 Local space shared memory method of heterogeneous multi-kernel microprocessor
US20060171244A1 (en) * 2005-02-03 2006-08-03 Yoshiyuki Ando Chip layout for multiple cpu core microprocessor
CN101008922A (en) * 2007-01-26 2007-08-01 浙江大学 Segmentation and paging data storage space management method facing heterogeneous polynuclear system
CN101246466A (en) * 2007-11-29 2008-08-20 华为技术有限公司 Management method and device for sharing internal memory in multi-core system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100652690B1 (en) * 2004-10-28 2006-12-07 엘지전자 주식회사 Multi processor apparatus for mobile communication device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060171244A1 (en) * 2005-02-03 2006-08-03 Yoshiyuki Ando Chip layout for multiple cpu core microprocessor
CN1758229A (en) * 2005-10-28 2006-04-12 中国人民解放军国防科学技术大学 Local space shared memory method of heterogeneous multi-kernel microprocessor
CN101008922A (en) * 2007-01-26 2007-08-01 浙江大学 Segmentation and paging data storage space management method facing heterogeneous polynuclear system
CN101246466A (en) * 2007-11-29 2008-08-20 华为技术有限公司 Management method and device for sharing internal memory in multi-core system

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102117241A (en) * 2009-12-30 2011-07-06 华为技术有限公司 Multi-core system debugging method and multi-core system
CN102547146A (en) * 2010-12-29 2012-07-04 新奥特(北京)视频技术有限公司 System and method for interacting subtitle data
CN103019809A (en) * 2011-09-28 2013-04-03 中国移动通信集团公司 Business processing device and method, and business processing control device
CN103019809B (en) * 2011-09-28 2015-05-27 中国移动通信集团公司 Business processing device and method, and business processing control device
CN111800353A (en) * 2020-06-30 2020-10-20 翱捷科技股份有限公司 Method and device for zero copy of memory of embedded system
CN112486704A (en) * 2020-11-27 2021-03-12 中船重工(武汉)凌久电子有限责任公司 Multi-core multiprocessor synchronization and communication system based on shared storage
CN112486704B (en) * 2020-11-27 2024-02-06 中船重工(武汉)凌久电子有限责任公司 Multi-core multiprocessor synchronization and communication system based on shared storage
CN112612623A (en) * 2020-12-25 2021-04-06 苏州浪潮智能科技有限公司 Method and equipment for managing shared memory
CN112612623B (en) * 2020-12-25 2022-08-09 苏州浪潮智能科技有限公司 Method and equipment for managing shared memory

Also Published As

Publication number Publication date
CN101246466B (en) 2012-06-20
CN101246466A (en) 2008-08-20

Similar Documents

Publication Publication Date Title
WO2009067950A1 (en) Management method and device of shared memory in multi-core system
CN107690622B9 (en) Method, equipment and system for realizing hardware acceleration processing
US10877695B2 (en) Memcached server functionality in a cluster of data processing nodes
TWI430102B (en) Network adapter resources allocating method,storage medium,and computer
US8438360B2 (en) Distributed storage through a volume device architecture
US20050038941A1 (en) Method and apparatus for accessing a memory
EP2240852B1 (en) Scalable sockets
Appavoo et al. Providing a cloud network infrastructure on a supercomputer
US20100020818A1 (en) Sharing buffer space in link aggregation configurations
WO2013082809A1 (en) Acceleration method, device and system for co-processing
CN114756388A (en) RDMA (remote direct memory Access) -based method for sharing memory among cluster system nodes as required
WO2012109961A1 (en) Method and device for allocating browser process
WO2017107816A1 (en) Method of processing data on virtualization platform and device
US20090133099A1 (en) Methods and systems for transparent software license suspension
Fei et al. FlexNFV: Flexible network service chaining with dynamic scaling
CN111752873A (en) System, apparatus and method for sharing Flash device among multiple host devices of computing platform
CN113821309B (en) Communication method, device, equipment and storage medium between microkernel virtual machines
CN102375789A (en) Non-buffer zero-copy method of universal network card and zero-copy system
JP4362502B2 (en) Disk control apparatus and data transfer control method
WO2023246843A1 (en) Data processing method, apparatus and system
CN110445580B (en) Data transmission method and device, storage medium, and electronic device
US7089378B2 (en) Shared receive queues
US8291176B2 (en) Protection domain groups to isolate access to memory windows
KR100396974B1 (en) Computer system and method with internal use of network switching
CN106201328B (en) A kind of method, apparatus and server of the disk space managing memory node

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 08855562

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 08855562

Country of ref document: EP

Kind code of ref document: A1