[go: up one dir, main page]

CN100458757C - Inter core communication method and apparatus for multi-core processor in embedded real-time operating system - Google Patents

Inter core communication method and apparatus for multi-core processor in embedded real-time operating system Download PDF

Info

Publication number
CN100458757C
CN100458757C CNB2005100873210A CN200510087321A CN100458757C CN 100458757 C CN100458757 C CN 100458757C CN B2005100873210 A CNB2005100873210 A CN B2005100873210A CN 200510087321 A CN200510087321 A CN 200510087321A CN 100458757 C CN100458757 C CN 100458757C
Authority
CN
China
Prior art keywords
message
core
nuclear
multinuclear
shared
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Lifetime
Application number
CNB2005100873210A
Other languages
Chinese (zh)
Other versions
CN1904873A (en
Inventor
蒋石竹
郭长旺
张�浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Datang Mobile Communications Equipment Co Ltd
Original Assignee
Datang Mobile Communications Equipment 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 Datang Mobile Communications Equipment Co Ltd filed Critical Datang Mobile Communications Equipment Co Ltd
Priority to CNB2005100873210A priority Critical patent/CN100458757C/en
Publication of CN1904873A publication Critical patent/CN1904873A/en
Application granted granted Critical
Publication of CN100458757C publication Critical patent/CN100458757C/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Multi Processors (AREA)

Abstract

The invention discloses an inter-core communicating method of multi-core processor in embedded real time operation system. It includes following steps: distributing memory as multi-core information sharing pool; writing information the source core would send into the pool; sending the information to target core; target core sending the information storing in pool to target mission. The invention also discloses an inter-core communicating device. It improves the inter-core communicating efficiency and realizes the unification of inner core communication and inter-core communication.

Description

嵌入式实时操作系统中多核处理器的核间通信方法及装置 Inter-core communication method and device of multi-core processor in embedded real-time operating system

技术领域 technical field

本发明涉及嵌入式实时操作系统和多核处理器,尤其涉及一种嵌入式实时操作系统中多核处理器的核间通信方法及装置。The invention relates to an embedded real-time operating system and a multi-core processor, in particular to an inter-core communication method and device for a multi-core processor in an embedded real-time operating system.

背景技术 Background technique

随着网络和计算机技术的飞速发展,对CPU(Central Process Unit,中央处理器)的性能要求越来越高。CPU性能的提升以前主要是通过提高主频来实现的,而主频的提升要求大幅度增加晶体管的数量,随之而来的散热问题也日益凸显。除了提高主频以外,另一个提高CPU性能的方法就是多核处理器。With the rapid development of network and computer technology, the performance requirements of CPU (Central Process Unit, central processing unit) are getting higher and higher. In the past, the improvement of CPU performance was mainly realized by increasing the main frequency, and the increase of the main frequency required a substantial increase in the number of transistors, and the ensuing heat dissipation problem became increasingly prominent. In addition to increasing the main frequency, another way to improve CPU performance is the multi-core processor.

多核处理器是在一个处理器上集成两个以上的计算单元,每个计算单元成为一个核,令一颗CPU提供接近多颗CPU的性能。多核处理器中的每个核上运行着各自的任务,而多个核上的任务之间常常需要传递数据信息(通常称之为传递消息),现有技术中,在多个核间通过数据管道来进行通信。A multi-core processor integrates more than two computing units on one processor, and each computing unit becomes a core, so that one CPU can provide performance close to that of multiple CPUs. Each core in the multi-core processor runs its own task, and often needs to transmit data information (commonly referred to as message delivery) between tasks on multiple cores. In the prior art, passing data between multiple cores pipes for communication.

图1所示为有两个核,核M 110和核N 120的多核处理器的结构,核M 110和核N 120分别有各自的专用内存区130和140,两个核间具有共享存储区170。每个核在共享内存区170中分配有向其他核发送数据用的数据管道,由于数据管道是单向的,所以在共享内存区170中有核M 110分配的核M至核N数据管道180和核N分配的核N至核M数据管道190。每个核在专用内存区中存储着一个静态的路由表,指向至其他核的数据管道。核M 110和核N120分别有各自的虚中断模块150和160,任意一个核可以通过操作目的核的虚中断模块触发该核的一次虚中断,该中断通知目的核在数据通道中有新的数据到来。Figure 1 shows the structure of a multi-core processor with two cores, core M 110 and core N 120. Core M 110 and core N 120 have their own dedicated memory areas 130 and 140 respectively, and there is a shared memory area between the two cores 170. Each core is assigned a data pipeline for sending data to other cores in the shared memory area 170. Since the data pipeline is unidirectional, there is a core M to core N data pipeline 180 allocated by the core M 110 in the shared memory area 170. and core N allocated core N to core M data pipeline 190 . Each core stores a static routing table in a dedicated memory area that points to data pipes to other cores. Core M 110 and core N120 have their own virtual interrupt modules 150 and 160 respectively, any one of the cores can trigger a virtual interrupt of the core by operating the virtual interrupt module of the target core, and the interrupt notifies the target core that there is new data in the data channel arrival.

当核M 110上的一个源任务向核N 120上的一个目的任务发送消息时,核M 110查询专用内存区130中的路由表,找到核M至核N数据管道180,将要传递消息的数据信息从专用内存区130拷贝到核M至核N数据管道180中;同时,核M 110通过核N 120的虚中断模块160使用内部虚中断与核N 120进行握手,传递目的任务标识和消息标识。核N 120响应虚中断,根据目的任务标识从核M至核N数据管道180中将该消息的数据信息拷贝到专用内存区140中,打包为消息并传递给目的任务。When a source task on the core M 110 sends a message to a destination task on the core N 120, the core M 110 queries the routing table in the dedicated memory area 130, finds the core M to core N data pipeline 180, and will transfer the data of the message Information is copied from the dedicated memory area 130 to the core M to core N data pipeline 180; at the same time, the core M 110 uses the internal virtual interrupt to shake hands with the core N 120 through the virtual interrupt module 160 of the core N 120, and transfers the target task identification and message identification . The core N 120 responds to the virtual interrupt, copies the data information of the message from the core M to the core N data pipeline 180 into the dedicated memory area 140 according to the target task identification, packs it into a message and delivers it to the target task.

在现有技术中,多核处理器的核间通信存在以下几个问题:In the prior art, the inter-core communication of multi-core processors has the following problems:

一次在核间传递的消息长度受到限制:由于数据管道在共享内存区中是固定分配的,始终占用着共享内存区,通常数据管道不可能分配很大的内存;同时为了减小数据管道中读写发生冲突的可能性,需要将数据管道设计为具有一定深度,即可以容纳多条消息,这样每条消息的长度受到限制,一般核间通信只能传递小数据量的消息;The length of a message transmitted between cores is limited: since the data pipeline is fixedly allocated in the shared memory area and always occupies the shared memory area, it is usually impossible for the data pipeline to allocate a large amount of memory; The possibility of writing conflicts requires the design of the data pipeline to have a certain depth, that is, it can accommodate multiple messages, so that the length of each message is limited, and the general inter-core communication can only transmit messages with a small amount of data;

核间通信效率低:从上述消息发送过程可知,完成一次核间通信需要两次拷贝该消息的所有数据,这极大地降低了核间通信的效率;Low efficiency of inter-core communication: From the above message sending process, it can be seen that to complete an inter-core communication, all data of the message needs to be copied twice, which greatly reduces the efficiency of inter-core communication;

核内任务通信和核间任务通信方式不同:ERTOS(Embedded Real TimeOperating System,嵌入式实时操作系统)为一个核内的任务间通信提供了消息队列机制;而核间通信采用的数据管道对ERTOS而言是虚拟的I/O(输入输出)设备,采用驱动提供的通信机制,这使得应用程序的开发极为不便。The communication methods of intra-core tasks and inter-core tasks are different: ERTOS (Embedded Real Time Operating System, embedded real-time operating system) provides a message queue mechanism for inter-task communication within a core; Language is a virtual I/O (input and output) device, which uses the communication mechanism provided by the driver, which makes the development of application programs extremely inconvenient.

发明内容 Contents of the invention

本发明要解决的是现有的多核处理器的核间通信效率低、一次通信传递的消息长度受到限制和核内通信和核间通信不统一的问题。The present invention aims to solve the problems of low inter-core communication efficiency of the existing multi-core processor, limited message length for one communication transfer, and inconsistency of intra-core communication and inter-core communication.

本发明所述嵌入式实时操作系统中多核处理器的核间通信方法包括以下步骤:The inter-core communication method of the multi-core processor in the embedded real-time operating system of the present invention comprises the following steps:

a)在共享内存区中分配内存作为多核共享消息池;a) allocate memory in the shared memory area as a multi-core shared message pool;

b)源核在多核共享消息池中分配多核消息内存块,用来写入所述消息b) The source core allocates a multi-core message memory block in the multi-core shared message pool for writing the message

c)源核将要发送的消息写入多核共享消息池;c) The source core writes the message to be sent into the multi-core shared message pool;

d)源核将所述消息在多核共享消息池中的地址、目的任务标识通过数据管道发送给目的核;d) The source core sends the address of the message in the multi-core shared message pool and the target task identifier to the target core through the data pipeline;

e)目的核将多核共享消息池中所述地址存放的所述消息传送给目的任务;e) The destination core transmits the message stored at the address in the multi-core shared message pool to the destination task;

f)目的任务接收消息后,目的核从共享消息池中释放消息所占用的多核消息内存块。f) After the destination task receives the message, the destination core releases the multi-core message memory block occupied by the message from the shared message pool.

另外,所述多核处理器的共享内存区设有用于核间通信的数据管道。In addition, the shared memory area of the multi-core processor is provided with a data pipeline for inter-core communication.

优选地,所述多核消息内存块包括头部信息区域和数据区域,其中所述头部信息区域用来存放头部信息,所述头部信息包括所述多核消息内存块的大小、所属任务标识,所述数据区域用来存放所述消息的数据;Preferably, the multi-core message memory block includes a header information area and a data area, wherein the header information area is used to store header information, and the header information includes the size of the multi-core message memory block and the task identifier to which it belongs , the data area is used to store the data of the message;

所述嵌入式实时操作系统的单核消息池的消息内存块与所述多核消息内存块的头部信息具有相同的格式。The message memory block of the single-core message pool of the embedded real-time operating system has the same format as the header information of the multi-core message memory block.

优选地,步骤e)具体还包括:目的核将所述消息在多核共享消息池中的地址放入目的任务的消息队列。Preferably, step e) specifically further includes: the destination core puts the address of the message in the multi-core shared message pool into the message queue of the destination task.

优选地,所述步骤a)与步骤b)之间具体还包括:Preferably, between said step a) and step b), it specifically further includes:

源核指明所述消息的目的核标识和目的任务标识;The source core indicates the target core ID and the target task ID of the message;

判断所述目的核标识与源核标识是否相同,如果相同,则通过所述嵌入式实时操作系统提供的单核内消息发送函数将消息发送给目的任务,并且不执行所述的步骤b)、c)、d)、e);如果不同,则执行步骤b)、c)、d)、e)。Judging whether the target core identification is identical to the source core identification, if identical, the message is sent to the purpose task by the message sending function in the single core provided by the embedded real-time operating system, and the step b) is not performed, c), d), e); if different, perform steps b), c), d), e).

优选地,所述步骤a)之前包括:对多核处理器上运行的所有任务进行统一的编号并记录运行该任务的核的标识;Preferably, said step a) includes before: uniformly numbering all tasks running on the multi-core processor and recording the identification of the core running the task;

所述步骤a)与步骤b)之间还具体包括:Between said step a) and step b), it also specifically includes:

源核指明所述消息的目的任务编号;The source core indicates the destination task number of the message;

判断所述目的任务是否在源核上运行,如果是,则通过所述嵌入式实时操作系统提供的单核内消息发送函数将消息发送给目的任务,并且不执行所述的步骤b)、c)、d)、e);如果否,则执行步骤b)、c)、d)、e)。Judging whether the purpose task is running on the source core, if so, the message is sent to the purpose task by the message sending function in the single core provided by the embedded real-time operating system, and the steps b) and c are not performed ), d), e); if not, perform steps b), c), d), e).

优选地,当所述消息的源核与目的核不同时,所述步骤b)之前包括:源核锁定多核共享消息池的自旋锁;Preferably, when the source core of the message is different from the target core, before the step b) includes: the source core locks the spin lock of the multi-core shared message pool;

所述步骤b)与步骤c)之间包括:源核解除多核共享消息池的自旋锁。The steps between step b) and step c) include: the source core releases the spin lock of the multi-core shared message pool.

优选地,当所述消息的源核与目的核不同时,所述步骤e)之后与步骤f)之前包括:目的核锁定多核共享消息池的自旋锁;Preferably, when the source core of the message is different from the target core, after the step e) and before the step f), include: the target core locks the spin lock of the multi-core shared message pool;

所述步骤f)之后包括:目的核解除多核共享消息池的自旋锁。After the step f), it includes: the target core releases the spin lock of the multi-core shared message pool.

优选地,所述步骤d)具体为:Preferably, the step d) is specifically:

源核将所述消息在多核共享消息池中的地址和目的任务标识拷贝至所述数据管道;The source core copies the address and the target task identifier of the message in the multi-core shared message pool to the data pipeline;

源核触发目的核的虚中断;The source core triggers the virtual interrupt of the destination core;

目的核响应虚中断,从所述数据管道中拷贝出所述消息在多核共享消息池中的地址和目的任务标识。The destination core responds to the virtual interrupt, and copies the address and destination task identifier of the message in the multi-core shared message pool from the data pipeline.

本发明还提供了一种嵌入式实时操作系统中多核处理器的核间通信装置,包括核、核间通信控制模块、虚中断模块、核间消息模块和包括数据通道和多核共享消息池的共享内存区,其中:The present invention also provides an inter-core communication device of a multi-core processor in an embedded real-time operating system, including a core, an inter-core communication control module, a virtual interrupt module, an inter-core message module, and a shared memory area, where:

所述核间消息模块根据所述核的发送指令将要发送的消息写入多核共享消息池,向所述核返回发送消息在多核共享消息池中的地址;并且根据所述核传递的要接收的消息在多核共享消息池中的地址,读取接收消息传递给所述核;The inter-core message module writes the message to be sent into the multi-core shared message pool according to the sending instruction of the core, and returns the address of the sent message in the multi-core shared message pool to the core; The address of the message in the multi-core shared message pool, read the received message and pass it to the core;

所述多核共享消息池用来存储核间通信的消息;The multi-core shared message pool is used to store messages for inter-core communication;

所述核间通信控制模块用来根据所述核的发送指令将要发送的消息在多核共享消息池中的地址和目的任务标识拷贝到数据通道中,并将其他核发往所述核的消息在多核共享消息池中的地址和目的任务标识从数据通道中拷贝给所述核;The inter-core communication control module is used to copy the address and destination task identifier of the message to be sent in the multi-core shared message pool to the data channel according to the sending instruction of the core, and send messages sent by other cores to the core in the multi-core The address and the target task identifier in the shared message pool are copied from the data channel to the core;

所述数据通道用来在核间传递消息在多核共享消息池中的地址和目的任务标识;The data channel is used to transfer the address and the target task identifier of the message in the multi-core shared message pool between the cores;

所述虚中断模块根据所述核的发送指令触发其他核的虚中断,并接受其他核的触发产生虚中断通知所述核接收其他核发送的消息;The virtual interrupt module triggers virtual interrupts of other cores according to the sending instruction of the core, and accepts the triggering of other cores to generate a virtual interrupt to notify the core to receive messages sent by other cores;

所述装置还包括识别模块、核内通信模块和单核消息池,其中:The device also includes an identification module, an intra-kernel communication module and a single-core message pool, wherein:

所述识别模块用来识别消息的目的核是所述核的发送指令,并将目的核是所述核的发送指令传递给所述核内通信模块;The identifying module is used to identify that the destination core of the message is the sending instruction of the core, and transfer the sending instruction that the destination core is the core to the in-core communication module;

所述核内通信模块根据所述核的发送指令在所述单核消息池中分配和释放消息内存块,通过消息内存块进行核内任务间的通信;The in-core communication module allocates and releases a message memory block in the single-core message pool according to the sending instruction of the core, and performs communication between tasks in the core through the message memory block;

所述单核消息池以消息内存块来存储核内任务间通信的消息。The single-core message pool uses message memory blocks to store messages communicated between tasks within the core.

优选地,所述核间消息模块包括消息内存模块和自旋锁模块,其中:Preferably, the inter-core message module includes a message memory module and a spin lock module, wherein:

所述消息内存模块根据所述核的发送指令为要发送的消息在多核共享消息池中分配多核消息内存块,在分配的多核消息内存块中写入发送消息,向所述核返回发送消息在多核共享消息池中的地址;或者根据所述核传递的要接收的消息在多核共享消息池中的地址,读取接收消息传递给所述核,并释放接收消息的多核消息内存块;The message memory module allocates a multi-core message memory block in the multi-core shared message pool for the message to be sent according to the sending instruction of the core, writes the sending message in the allocated multi-core message memory block, and returns the sending message to the core The address in the multi-core shared message pool; or according to the address of the message to be received delivered by the core in the multi-core shared message pool, read the received message and pass it to the core, and release the multi-core message memory block that receives the message;

所述自旋锁模块在所述消息内存模块分配和释放多核消息内存块前锁定所述多核共享消息池的自旋锁,并在分配和释放多核消息内存块后解除所述自旋锁。The spin lock module locks the spin lock of the multi-core shared message pool before the message memory module allocates and releases the multi-core message memory block, and releases the spin lock after allocating and releasing the multi-core message memory block.

优选地,所述多核消息内存块和消息内存块都包括头部信息区域和数据区域,其中所述头部信息包括所述多核消息内存块或所述消息内存块的大小、所属任务标识,所述数据区域用来存放所述消息的数据;Preferably, both the multi-core message memory block and the message memory block include a header information area and a data area, wherein the header information includes the size of the multi-core message memory block or the message memory block, and the identifier of the task to which it belongs. The data area is used to store the data of the message;

所述多核消息内存块与所述消息内存块具有相同的头部信息格式。The multi-core message memory block has the same header information format as the message memory block.

本发明通过在共享内存区中建立多核共享消息池存储在核间传输的消息,以数据管道传输消息在多核通向消息池中的地址,实现了核间的消息队列通信机制,从而避免了两次消息数据的拷贝过程,提高了核间通信的效率,每次传输消息的长度也不再受到数据管道容量的限制;The present invention establishes a multi-core shared message pool in the shared memory area to store the messages transmitted between the cores, and uses a data pipeline to transmit the message to the address in the message pool in the multi-core, thereby realizing the message queue communication mechanism between the cores, thereby avoiding two The copy process of the message data improves the efficiency of inter-core communication, and the length of each message transmission is no longer limited by the capacity of the data pipeline;

进而,由于本发明中单核任务通信和核间任务通信都采用消息队列机制,并且为核提供了单一的消息发送和接收接口,实现了核内通信和核间通信的统一,为应用程序的开发提供了方便。Furthermore, since both the single-core task communication and the inter-core task communication in the present invention adopt the message queue mechanism, and a single message sending and receiving interface is provided for the core, the unification of the internal communication and the inter-core communication is realized, and the application program Development provides convenience.

附图说明 Description of drawings

图1所示为具有两个核的多核处理器的结构示意图;Figure 1 shows a schematic structural view of a multi-core processor with two cores;

图2所示为本发明所述核间通信方法的流程图;Fig. 2 shows the flowchart of the inter-core communication method of the present invention;

图3所示为本发明所述核间通信装置的结构图。FIG. 3 is a structural diagram of the inter-core communication device of the present invention.

具体实施方式 Detailed ways

ERTOS为单核的核内任务通信提供了消息队列机制。ERTOS在核的专用内存区中控制着一块内存,专用于核内通信的消息数据存储,这块内存称为单核消息池。任务在发送消息前,通过ERTOS从单核消息池中分配指定大小的消息内存块。一个消息内存块分为头部信息区域和数据区域,头部信息区域中记录了该消息内存块的相关信息,如大小、所属任务的ID(标识)等等,任务在数据区域中存放消息数据。ERTOS provides a message queue mechanism for single-core intra-kernel task communication. ERTOS controls a piece of memory in the dedicated memory area of the core, which is dedicated to message data storage for intra-kernel communication. This piece of memory is called a single-core message pool. Before sending a message, a task allocates a message memory block of a specified size from the single-core message pool through ERTOS. A message memory block is divided into a header information area and a data area. The header information area records the relevant information of the message memory block, such as the size, the ID (identification) of the task it belongs to, etc., and the task stores the message data in the data area. .

消息队列由运行在核上的任务创建,消息队列实质上是一个链表,链表中每一项代表一个消息,其实际内容因ERTOS的不同而有所区别,必备的内容是指向所代表的消息的链接指针,或者说是该消息在单核消息池中的地址。The message queue is created by the tasks running on the core. The message queue is essentially a linked list. Each item in the linked list represents a message. The actual content varies with ERTOS. The necessary content points to the represented message. The link pointer of the message, or the address of the message in the single-core message pool.

任务发送消息时,将消息数据写入到所分配消息内存块的数据区域中。之后,调用ERTOS提供的消息发送函数将消息发送到目的任务绑定的消息队列中。这一过程的具体实现如下:ERTOS修改目的任务消息队列的链接指针,使其指向该消息内存块;修改消息内存块头部信息中记录的链接信息将消息内存块插入到目的任务的消息队列链表中。When a task sends a message, it writes the message data into the data area of the allocated message memory block. After that, call the message sending function provided by ERTOS to send the message to the message queue bound to the destination task. The specific implementation of this process is as follows: ERTOS modifies the link pointer of the message queue of the target task to point to the message memory block; modifies the link information recorded in the header information of the message memory block and inserts the message memory block into the message queue linked list of the target task middle.

可见,在这一过程中并没有数据拷贝发生。需要特别指出的是,ERTOS消息队列的实现机制必须与消息池的实现机制相一致,因为两者对于消息内存块的头部信息格式需要有统一的认识。It can be seen that no data copying occurs during this process. It should be pointed out that the implementation mechanism of the ERTOS message queue must be consistent with the implementation mechanism of the message pool, because the two need to have a unified understanding of the header information format of the message memory block.

ERTOS的单核消息池是一种单核独占的消息池,只为一个核提供消息内存块的分配和回收功能。对于单核消息池的互斥访问只需要在一个核上的多个任务间进行,由ERTOS提供的信号量、互斥锁等机制实现。单核消息池不能服务于多核间的消息通信。The single-core message pool of ERTOS is a single-core exclusive message pool, which only provides the allocation and recycling function of message memory blocks for one core. Mutually exclusive access to a single-core message pool only needs to be performed between multiple tasks on one core, and is implemented by mechanisms such as semaphores and mutexes provided by ERTOS. A single-core message pool cannot serve message communication between multiple cores.

本发明的思路是实现多核共享的消息池,结合核内任务的消息队列实现核间消息通信。本发明中核间通信方法的流程如图2所示,其中,发送消息的任务运行的核为源核,接收消息的目的任务运行的核为目的核。The idea of the present invention is to realize a message pool shared by multiple cores, and realize inter-core message communication in combination with a message queue of tasks in the core. The flow of the inter-core communication method in the present invention is shown in FIG. 2 , wherein the core running on the task sending the message is the source core, and the core running on the target task receiving the message is the target core.

在步骤S010,在共享内存区中分配内存作为多核共享消息池。多核共享消息池用来存放核间通信的消息数据和头部信息,可以在系统初始化过程中创建,也可以在源核发送消息前创建。In step S010, memory is allocated in the shared memory area as a multi-core shared message pool. The multi-core shared message pool is used to store message data and header information for inter-core communication. It can be created during system initialization or before the source core sends messages.

在步骤S020,在共享内存区建立源核至目的核的数据管道。建立数据管道的方法与现有技术中相同,不再赘述。In step S020, a data pipeline from the source core to the target core is established in the shared memory area. The method for establishing the data pipeline is the same as that in the prior art, and will not be repeated here.

在本发明中,源核仍需要通过数据管道向目的核传递消息在多核共享消息池中的地址和目的任务ID,也就是说,地址和目的任务ID仍需要经过两次拷贝。但由于这些内容仅仅只有几个字节的数据,因而几乎不会对核间通信效率造成影响。In the present invention, the source core still needs to transfer the address and the target task ID of the message in the multi-core shared message pool to the target core through the data pipeline, that is to say, the address and the target task ID still need to be copied twice. However, since these contents are only a few bytes of data, it will hardly affect the efficiency of inter-core communication.

在步骤S030,判断源核是否进行核间通信,如果是,执行步骤S050;如果否,执行步骤S040,通过ERTOS提供的单核内消息发送函数发送消息,进行核内任务间的通信。In step S030, determine whether the source core performs inter-core communication, if yes, execute step S050; if not, execute step S040, send a message through the single-core message sending function provided by ERTOS, and perform inter-core task communication.

由于本发明的核间通信可以采用消息队列的方式实现,这样就具备统一核内通信和核间通信接口的条件。也就是说,在发送消息时不必区分核内通信和核间通信都使用相同的参数,根据这些参数判决是核内通信还是核间通信。Since the inter-core communication of the present invention can be realized in the form of a message queue, the condition of unifying the inter-core communication and the inter-core communication interface is met. That is to say, when sending a message, it is not necessary to distinguish that both intra-core communication and inter-core communication use the same parameters, and determine whether to use the same parameters for intra-core communication or inter-core communication based on these parameters.

本步骤有多种实现手段,以下为两个可选的方式:There are many ways to implement this step, the following are two optional ways:

源核在发送消息时,不论核内通信还是核间通信,在参数中都包括该消息的目的核ID和目的任务ID;这样,只要判断目的核ID与源核ID是否相同,即可得知是核内通信还是核间通信;When the source core sends a message, regardless of intra-core communication or inter-core communication, the parameters include the destination core ID and the destination task ID of the message; in this way, as long as it is judged whether the destination core ID is the same as the source core ID, it can be known Is it intra-core communication or inter-core communication;

对多核处理器上运行的所有任务进行统一的编号,同时记录运行该任务的核的ID;源核在发送消息时,在参数中都包括该消息的目的任务编号;查找出运行目的任务的核ID,看其与源核ID是否相同即可得知是核内通信还是核间通信。Uniformly number all tasks running on the multi-core processor, and record the ID of the core running the task; when the source core sends a message, it includes the target task number of the message in the parameter; find out the core running the target task ID, check whether it is the same as the source core ID to know whether it is intra-core communication or inter-core communication.

在步骤S050,源核锁定多核共享消息池的自旋锁。In step S050, the source core locks the spin lock of the multi-core shared message pool.

在具有共享内存区的多核系统中,由于每个核都可以在任一时间请求使用共享内存区中的临界资源,即可供多核共享的内存块,因此共享内存区应当提供一种互斥机制,以避免资源使用陷入混乱状态。共享内存区以如下方式实现互斥访问:In a multi-core system with a shared memory area, since each core can request critical resources in the shared memory area at any time, that is, a memory block shared by multiple cores, the shared memory area should provide a mutual exclusion mechanism. To avoid resource usage into chaos. The shared memory area implements mutual exclusion access as follows:

每个核在使用共享内存区中的某个临界资源前,需要申请在该临界资源内分配内存空间,申请成功后该核得到所申请的内存空间的地址。核只能通过这个地址来访问这一段内存空间,其他核要想对该段内存空间进行操作,必须先得到这个地址,因而提出申请的核可以独自使用该段内存空间,也可以将该段内存空间的控制权交给别的核。Before using a critical resource in the shared memory area, each core needs to apply for memory space allocation in the critical resource. After the application is successful, the core obtains the address of the requested memory space. The core can only access this section of memory space through this address. If other cores want to operate on this section of memory space, they must first obtain this address. Therefore, the applying core can use this section of memory space alone, or it can The control of the space is handed over to other cores.

共享内存区为每个临界资源提供了自旋锁以控制对该临界资源的分配和释放过程。任何一个核都可以试图去锁定一个自旋锁,如果该自旋锁已经被别的核锁定并且还没有解锁,则这种申请锁定的操作会使执行这一操作的核陷入忙等状态,直到占用该自旋锁的核对其执行解锁操作。某个核对临界资源提出内存空间分配申请,锁定自旋锁以确保同一时间不会有其他的对临界资源内存空间的操作存在,来保证对所分配到的内存空间具有独占的使用权。The shared memory area provides a spin lock for each critical resource to control the allocation and release process of the critical resource. Any core can try to lock a spin lock. If the spin lock has been locked by other cores and has not been unlocked, the operation of applying for a lock will cause the core performing this operation to fall into a busy state until The core that holds the spinlock performs an unlock operation on it. A check critical resource applies for memory space allocation, and locks the spin lock to ensure that there will be no other operations on the critical resource memory space at the same time, so as to ensure the exclusive right to use the allocated memory space.

本发明中也采用自旋锁实现核间对多核共享消息池的互斥访问。In the present invention, a spin lock is also used to realize mutually exclusive access to a multi-core shared message pool between cores.

在步骤S060,源核在多核共享消息池中分配多核消息内存块,用来写入所述消息。本发明中多核消息内存块也包括包括头部信息区域和数据区域,其中头部信息也包括多核消息内存块的大小、所属任务ID等信息,数据区域用来存放传输消息的数据。In step S060, the source core allocates a multi-core message memory block in the multi-core shared message pool for writing the message. In the present invention, the multi-core message memory block also includes a header information area and a data area, wherein the header information also includes information such as the size of the multi-core message memory block, the task ID to which it belongs, and the data area is used to store the data of the transmitted message.

为了实现核内通信和核间通信的统一,多核消息内存块应该与单核消息池中的消息内存块具有相同的结构,尤其是相同头部信息的格式。In order to realize the unification of intra-core communication and inter-core communication, the multi-core message memory block should have the same structure as the message memory block in the single-core message pool, especially the format of the same header information.

在步骤S070,源核解除多核共享消息池的自旋锁。In step S070, the source core releases the spin lock of the multi-core shared message pool.

在步骤S080,源核将要发送的消息写入多核共享消息池,即写入在多核共享消息池中分配到的多核消息内存块。In step S080, the source core writes the message to be sent into the multi-core shared message pool, that is, writes into the multi-core message memory block allocated in the multi-core shared message pool.

在步骤S090,源核将该消息在多核共享消息池中的地址、目的任务ID通过数据管道发送给目的核。In step S090, the source core sends the address of the message in the multi-core shared message pool and the target task ID to the target core through the data pipeline.

本步骤中通过数据管道发送数据的方法与现有技术中相同,具体为:The method of sending data through the data pipeline in this step is the same as that in the prior art, specifically:

源核将该消息在多核共享消息池中的地址和目的任务标识拷贝至源核至目的核的数据管道;The source core copies the address of the message in the multi-core shared message pool and the target task identifier to the data pipeline from the source core to the target core;

源核触发目的核的虚中断;The source core triggers the virtual interrupt of the destination core;

目的核响应虚中断,从源核至目的核的数据管道中拷贝出该消息在多核共享消息池中的地址和目的任务标识。The destination core responds to the virtual interrupt, and copies the address of the message in the multi-core shared message pool and the destination task identifier from the data pipeline from the source core to the destination core.

在步骤S100,目的核将多核共享消息池中该地址存放的消息传送给目的任务。In step S100, the destination core transmits the message stored at the address in the multi-core shared message pool to the destination task.

当多核消息内存块与单核的消息内存块具有相同的结构时,目的任务可以采用与核内通信同样的方法来接收消息。在这种情况下,目的核将该消息包括在多核共享消息池中的地址的链接信息写入目的任务的消息队列中,目的任务即可接收到源核发送的消息。When the multi-core message memory block has the same structure as the single-core message memory block, the destination task can use the same method as the intra-core communication to receive the message. In this case, the destination core writes the link information of the address included in the message in the multi-core shared message pool into the message queue of the destination task, and the destination task can receive the message sent by the source core.

在步骤S110,目的核锁定多核共享消息池的自旋锁。In step S110, the target core locks the spin lock of the multi-core shared message pool.

在步骤S120,目的核释放所述多核消息内存块。In step S120, the destination core releases the multi-core message memory block.

在步骤S130,目的核解除多核共享消息池的自旋锁。In step S130, the target core releases the spin lock of the multi-core shared message pool.

在目的任务接收消息后,执行步骤S110至S130释放通信的消息占用的多核消息内存块。After the destination task receives the message, execute steps S110 to S130 to release the multi-core message memory block occupied by the communicated message.

本发明还提供了一种ERTOS中实现核间通信的装置,其结构如图3所示。需要说明的是,共享内存区350、在共享内存区350中的数据通道351和多核共享消息池352是多核处理器中所有核共用的,而图中的其他模块则只由一个核使用。数据通道351用来在核间传递消息在多核共享消息池中的地址和目的任务标识,多核共享消息池352用来存储核间通信的消息。The present invention also provides a device for realizing inter-core communication in ERTOS, the structure of which is shown in FIG. 3 . It should be noted that the shared memory area 350 , the data channel 351 in the shared memory area 350 and the multi-core shared message pool 352 are shared by all cores in the multi-core processor, while other modules in the figure are only used by one core. The data channel 351 is used to transfer the address and the target task identifier of the message in the multi-core shared message pool between cores, and the multi-core shared message pool 352 is used to store messages communicated between cores.

在核310向另一个核发送消息时,向输出发送指令。核间消息模块340中的消息内存模块341根据发送指令为要发送的消息在多核共享消息池352中分配多核消息内存块,在其中写入发送消息,并将发送消息在多核共享消息池352中的地址返回给核310;When a core 310 sends a message to another core, an instruction is sent to an output. The message memory module 341 in the inter-core message module 340 allocates a multi-core message memory block in the multi-core shared message pool 352 for the message to be sent according to the sending instruction, writes the message to be sent therein, and sends the message in the multi-core shared message pool 352 The address of is returned to the core 310;

核310向核间通信控制模块320输出发送指令,并将要发送的消息在多核共享消息池352中的地址和目的任务标识同时通知核间通信控制模块320。核间通信控制模块320将该地址和目的任务标识拷贝到数据通道351中;The core 310 outputs a sending instruction to the inter-core communication control module 320 , and simultaneously notifies the inter-core communication control module 320 of the address and the target task identifier of the message to be sent in the multi-core shared message pool 352 . The inter-core communication control module 320 copies the address and the target task identifier into the data channel 351;

核310向虚中断模块330输出发送指令,虚中断模块330触发目的核的虚中断;至此,消息发送完成。The core 310 outputs a sending instruction to the virtual interrupt module 330, and the virtual interrupt module 330 triggers a virtual interrupt of the target core; so far, the message sending is completed.

当有另一个核向核310发送消息时,虚中断模块330接受源核的触发产生虚中断,通知核310有其他核发送的消息到达;When another core sends a message to the core 310, the virtual interrupt module 330 accepts the trigger of the source core to generate a virtual interrupt, and notifies the core 310 that the message sent by other cores arrives;

核310通知核间通信控制模块320接收数据,核间通信控制模块320将源核发往核310的消息在多核共享消息池352中的地址和目的任务标识拷贝给核310;The core 310 notifies the inter-core communication control module 320 to receive the data, and the inter-core communication control module 320 copies the address and the destination task identifier in the multi-core shared message pool 352 of the message sent to the core 310 by the source core to the core 310;

核310指令核间消息模块340读取数据,同时将要接收的消息在多核共享消息池352中的地址通知核间消息模块340,核间消息模块340中的消息内存模块341从多核共享消息池352的指定地址读取接收消息传递给核310,并在消息使用完毕后释放接收消息的多核消息内存块;至此,消息接收完成。Kernel 310 instructs inter-core message module 340 to read the data, and simultaneously notifies the inter-core message module 340 of the address of the message to be received in the multi-core shared message pool 352, and the message memory module 341 in the inter-core message module 340 reads the data from the multi-core shared message pool 352 The specified address reads the received message and passes it to the core 310, and releases the multi-core message memory block of the received message after the message is used; so far, the message reception is completed.

核间消息模块340中的自旋锁模块342用来控制对多核共享消息池352中临界资源的互斥访问,在消息内存模块341分配和释放多核消息内存块前锁定多核共享消息池352的自旋锁,并在分配和释放多核消息内存块后解除自旋锁。The spin lock module 342 in the inter-core message module 340 is used for controlling the mutually exclusive access to critical resources in the multi-core shared message pool 352, and locks the self-locking of the multi-core shared message pool 352 before the message memory module 341 allocates and releases the multi-core message memory block. spinlock, and release the spinlock after allocating and freeing the multicore message memory block.

为了使核间通信和核内通信对核310具有统一的接口,可以在核310和与其连接的核间消息模块340、核间通信控制模块320和虚中断模块330之间增加识别模块360。In order to make inter-core communication and intra-core communication have a unified interface for the core 310 , an identification module 360 can be added between the core 310 and the inter-core message module 340 , the inter-core communication control module 320 and the virtual interrupt module 330 connected thereto.

由于核310在接收来自核间通信的消息时是由虚中断模块320触发的,因此可以识别模块360只在核310发送数据时对消息的目的核为核310本身的发送指令进行识别,并将目的核为核310本身的发送指令传递给核内通信模块370。Since the core 310 is triggered by the virtual interrupt module 320 when receiving the message from the inter-core communication, the identification module 360 can only identify the sending instruction of the core 310 as the destination core of the message when the core 310 sends data, and send The destination core is the send instruction of the core 310 itself, which is passed to the in-core communication module 370 .

核内通信模块370根据发送指令在单核消息池380中分配和释放消息内存块,通过消息内存块进行核内任务间的通信。单核消息池380以消息内存块来存储核内任务间通信的消息。The in-core communication module 370 allocates and releases a message memory block in the single-core message pool 380 according to the sending instruction, and performs communication between tasks in the core through the message memory block. The single-core message pool 380 uses message memory blocks to store messages communicated between tasks within the core.

当多核共享消息池352与单核消息池380对各自的多核消息内存块和消息内存块的实现机制相同时,核310即可采用同一消息队列来接收核间通信和核内通信的消息。这需要多核消息内存块与消息内存块一样,包括头部信息区域和数据区域,其中头部信息包括内存块的大小、所属任务标识,而数据区域用来存放消息的数据;同时,多核消息内存块还要与消息内存块具有相同的头部信息格式。When the multi-core shared message pool 352 and the single-core message pool 380 implement the same mechanism for their respective multi-core message memory blocks and message memory blocks, the core 310 can use the same message queue to receive messages for inter-core communication and intra-core communication. This requires that the multi-core message memory block is the same as the message memory block, including the header information area and the data area, where the header information includes the size of the memory block and the task identifier to which it belongs, and the data area is used to store the data of the message; at the same time, the multi-core message memory The block must also have the same header information format as the message memory block.

可见,本发明中核间通信只要拷贝几个字节的数据,而不需要对消息的数据进行二次拷贝,这样的通信机制提高了核间通信的效率,能够满足更多应用的需要;本发明还将核间消息队列通信的接口与单核内多任务通信的接口进行统一,方便了用户的使用。而本发明提供的多核共享消息池的功能,能更多地满足用户的需求。It can be seen that the inter-core communication in the present invention only needs to copy the data of a few bytes, and does not need to copy the data of the message twice. Such a communication mechanism improves the efficiency of the inter-core communication and can meet the needs of more applications; the present invention It also unifies the interface of message queue communication between cores and the interface of multi-task communication within a single core, which is convenient for users to use. However, the function of the multi-core shared message pool provided by the present invention can better meet the needs of users.

通过数据通道在核间传送数据的过程在具体实现中与ERTOS所使用的主板硬件相关。为了使ERTOS能够不经修改运行在多种主板上,现有技术中的方案是在主板硬件和ERTOS中增加一层BSP(Board Support Package,板级支持包),为ERTOS提供正确的接口,屏蔽底层硬件的不同。具体到核间数据通道的实现,与BSP有两个接口,一个是由BSP提供给数据发送方的接口,另一个数据接收方向BSP提供的接口。The process of transferring data between cores through the data channel is related to the motherboard hardware used by ERTOS in the specific implementation. In order to enable ERTOS to run on a variety of mainboards without modification, the solution in the prior art is to add a layer of BSP (Board Support Package) to the mainboard hardware and ERTOS to provide correct interfaces for ERTOS and shield The underlying hardware is different. Specific to the realization of the inter-core data channel, there are two interfaces with the BSP, one is the interface provided by the BSP to the data sender, and the other is the interface provided by the data receiver to the BSP.

本发明建议对上述两个接口进行标准化的定义,这样,当硬件环境发生变化、或是BSP实现核间固定长度数据通信的内部机制发生改变、或是由其它模块来实现核间固定长度数据通信的功能时,只要遵从了这两个接口的标准化定义,本发明所述方法或装置不经改动仍然能够正确的工作。这能在最大程度上提高可移植性。The present invention proposes to carry out the definition of standardization to above-mentioned two interfaces, like this, when hardware environment changes, or BSP realizes the internal mechanism of fixed-length data communication between cores to change, or realizes inter-core fixed-length data communication by other modules As long as the standardized definitions of these two interfaces are complied with, the method or device of the present invention can still work correctly without modification. This maximizes portability.

本发明在实现核间通信时只需要知道目的核及目的任务ID,因而不仅适用于静态任务的ERTOS,也适用于具有动态创建任务功能的ERTOS。The present invention only needs to know the target core and the target task ID when realizing inter-core communication, so it is not only applicable to ERTOS with static tasks, but also applicable to ERTOS with the function of dynamically creating tasks.

以上所述本发明的实施方式,并不构成对本发明保护范围的限定。任何在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的权利要求保护范围之内。The embodiments of the present invention described above are not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the claims of the present invention.

Claims (11)

1. the communication method between cores of polycaryon processor in the embedded real-time operating system, the shared drive district of described polycaryon processor is provided with the data pipe that is used for internuclear communication, it is characterized in that, may further comprise the steps:
A) storage allocation is shared message pool as multinuclear in the shared drive district;
B) source nuclear is shared at multinuclear and is distributed multinuclear message memory block in the message pool, is used for writing the message that will send;
C) source is examined the message that will send and is write the shared message pool of multinuclear;
D) source nuclear sends to purpose nuclear with address, the purpose task identification of described message in the shared message pool of multinuclear by data pipe;
E) purpose is examined the described message that address described in the shared message pool of multinuclear is deposited and is sent the purpose task to;
F) after the purpose task receives message, purpose nuclear shared multinuclear message memory block of release message from share message pool.
2. according to the described communication method between cores of claim 1, it is characterized in that: described multinuclear message memory block comprises header information zone and data area, wherein said header information zone is used for depositing header information, described header information comprises the size of described multinuclear message memory block, affiliated task identification, and described data area is used for depositing the data of described message;
The message memory block of the monokaryon message pool of described embedded real-time operating system has identical form with the header information of described multinuclear message memory block.
3. according to the described communication method between cores of claim 2, it is characterized in that step e) specifically also comprises: purpose nuclear is put into the address of described message in the shared message pool of multinuclear the message queue of purpose task.
4. according to the described communication method between cores of claim 3, it is characterized in that, specifically also comprise between described step a) and the step b): source nuclear indicates the purpose nuclear sign and the purpose task identification of described message;
Judge whether described purpose nuclear sign identical with source nuclear sign, if identical, then message transmission function sends to the purpose task with message in the monokaryon that provides by described embedded real-time operating system, and does not carry out described step b), c), d), e); If different, then carry out described step b), c), d), e).
5. according to the described communication method between cores of claim 3, it is characterized in that, comprise before the described step a): the sign of all tasks of moving on the polycaryon processor being carried out the nuclear of unified numbering and this task of record operation;
Also specifically comprise between described step a) and the step b):
Source nuclear indicates the purpose mission number of described message;
Judge the whether operation on the nuclear of source of described purpose task, if then message sends function message is sent to the purpose task in the monokaryon that provides by described embedded real-time operating system, and does not carry out described step b), c), d), e); If not, then carry out described step b), c), d), e).
6. according to any described communication method between cores of claim 2 to 5, it is characterized in that: nuclear is examined not simultaneously with purpose when the source of described message, comprises before the described step b): source nuclear locking multinuclear is shared the spin lock of message pool;
Comprise between described step b) and the step c): source nuclear is removed the spin lock that multinuclear is shared message pool.
7. according to the described communication method between cores of claim 6, it is characterized in that nuclear is examined not simultaneously with purpose when the source of described message, comprises after the described step e) with before the step f): the spin lock of the shared message pool of purpose nuclear locking multinuclear;
Comprise after the described step f): purpose nuclear is removed the spin lock that multinuclear is shared message pool.
8. according to the described communication method between cores of claim 7, it is characterized in that described step d) is specially:
Address and purpose task identification that source nuclear is shared described message in the message pool at multinuclear are copied to described data pipe;
Source nuclear triggers the void interruption of purpose nuclear;
The empty interruption of purpose nuclear response copies out address and the purpose task identification of described message in the shared message pool of multinuclear from described data pipe.
9. the internuclear communicator of polycaryon processor in the embedded real-time operating system, it is characterized in that, comprise nuclear, internuclear communication control module, empty interrupt module, inter-core message module and comprise data channel and the shared drive district of the shared message pool of multinuclear, wherein:
Described inter-core message module instructs the message that will send to write the shared message pool of multinuclear according to the transmission of described nuclear, returns to described nuclear and sends the address of message in the shared message pool of multinuclear; And, read reception message and pass to described nuclear according to the address of the message that will receive in the shared message pool of multinuclear of described nuclear transmission;
Described multinuclear is shared the message that message pool is used for storing internuclear communication;
Described internuclear communication control module is used for copying in the data channel according to address and purpose task identification that the message that the transmission of described nuclear instruction will send is shared in the message pool at multinuclear, and other are authorized address and the purpose task identification shared in the message pool at multinuclear toward the message of described nuclear copies from data channel to described nuclear;
Described data channel is used at address and the purpose task identification of internuclear pass-along message in the shared message pool of multinuclear;
Described empty interrupt module interrupts according to the void of other nuclears of transmission instruction triggers of described nuclear, and the described stone grafting of the empty interrupt notification of triggering for generating of accepting other nuclears is received other and authorized the message of sending;
Described device also comprises communication module and monokaryon message pool in identification module, the nuclear, wherein:
It is the transmission instruction of described nuclear that described identification module is used for the purpose nuclear of identification message, and is that the transmission instruction of described nuclear passes to communication module in the described nuclear with purpose nuclear;
Communication module is distributed and the release message memory block in described monokaryon message pool according to the transmission instruction of described nuclear in the described nuclear, the communication in examining by the message memory block between task;
Described monokaryon message pool is stored the message of intertask communication in the nuclear with the message memory block.
10. according to the described internuclear communicator of claim 9, it is characterized in that described inter-core message module comprises message memory modules and spin lock module, wherein:
Described message memory modules is shared at multinuclear for the message that will send according to the transmission instruction of described nuclear and is distributed multinuclear message memory block in the message pool, in the multinuclear message memory block that distributes, write transmission message, return to described nuclear and send the address of message in the shared message pool of multinuclear; Perhaps, read reception message and pass to described nuclear, and discharge the multinuclear message memory block that receives message according to the address of the message that will receive in the shared message pool of multinuclear of described nuclear transmission;
Described spin lock module described multinuclear of locking before described message memory modules distributes and discharges multinuclear message memory block is shared the spin lock of message pool, and removes described spin lock in distribution with after discharging multinuclear message memory block.
11. according to the described internuclear communicator of claim 10, it is characterized in that, described multinuclear message memory block and message memory block all comprise header information zone and data area, wherein said header information comprises the size of described multinuclear message memory block or described message memory block, affiliated task identification, and described data area is used for depositing the data of described message;
Described multinuclear message memory block has identical header information form with described message memory block.
CNB2005100873210A 2005-07-28 2005-07-28 Inter core communication method and apparatus for multi-core processor in embedded real-time operating system Expired - Lifetime CN100458757C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100873210A CN100458757C (en) 2005-07-28 2005-07-28 Inter core communication method and apparatus for multi-core processor in embedded real-time operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100873210A CN100458757C (en) 2005-07-28 2005-07-28 Inter core communication method and apparatus for multi-core processor in embedded real-time operating system

Publications (2)

Publication Number Publication Date
CN1904873A CN1904873A (en) 2007-01-31
CN100458757C true CN100458757C (en) 2009-02-04

Family

ID=37674139

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100873210A Expired - Lifetime CN100458757C (en) 2005-07-28 2005-07-28 Inter core communication method and apparatus for multi-core processor in embedded real-time operating system

Country Status (1)

Country Link
CN (1) CN100458757C (en)

Families Citing this family (51)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100451975C (en) * 2007-02-13 2009-01-14 杭州华三通信技术有限公司 System and method for implementing message joint processing by multi-core CPU
CN101170511B (en) * 2007-11-20 2010-11-24 中兴通讯股份有限公司 Device and method for realizing multi-core processor communication in built-in operating system
CN101158920B (en) * 2007-11-22 2011-02-16 杭州华三通信技术有限公司 Method and apparatus for detecting fault of operating system
CN101458650B (en) * 2007-12-13 2010-12-15 华为技术有限公司 Apparatus and method for detecting internal memory transfer abnormity in multi-core system
CN100580630C (en) * 2007-12-29 2010-01-13 中国科学院计算技术研究所 Multi-core processor meeting SystemC syntax requirements and method for obtaining its execution code
US7908403B2 (en) * 2008-02-14 2011-03-15 International Business Machines Corporation Reserved device access contention reduction
CN101262501B (en) * 2008-04-23 2011-04-20 杭州华三通信技术有限公司 An inter-core communication method in multi-core system and one multi-core system
CN101635006B (en) * 2008-07-22 2012-02-29 中国科学院计算技术研究所 A Mutex and Semaphore Unit Group of Multi-Core Processors Satisfied with SystemC Syntax
CN101634956B (en) * 2009-08-25 2012-08-08 华为技术有限公司 Dispatching method and dispatcher of information of polynuclear processor
CN101894092B (en) * 2010-07-28 2012-09-26 杭州华三通信技术有限公司 Multi-core CPU and inter-core communication method thereof
CN102073565B (en) * 2010-12-31 2014-02-19 华为技术有限公司 Trigger operation method, multi-core group debugging method, device and system
CN102355423B (en) * 2011-10-19 2013-11-27 迈普通信技术股份有限公司 Forwarded resource access method and routing system
CN102713852B (en) 2012-02-01 2014-06-04 华为技术有限公司 Multicore processor system
CN106339263B (en) * 2012-05-29 2020-01-31 安科讯(福建)科技有限公司 method for communication among multiple software running environments
CN104426958B (en) * 2013-08-29 2018-03-16 华为技术有限公司 A kind of communication means, apparatus and system
CN104572315B (en) * 2013-10-23 2018-12-25 华为技术有限公司 Realize method, communication entity and the distributed communication system of intersubsystem communication
CN103559079A (en) * 2013-11-15 2014-02-05 深圳市道通科技有限公司 Shared memory based data access method and device
CN103825782B (en) * 2014-03-07 2017-08-22 新华三技术有限公司 It is a kind of to utilize the internuclear method and apparatus for interrupting the unreasonable task of positioning
CN105589829A (en) * 2014-09-15 2016-05-18 华为技术有限公司 Data processing method based on multi-core processor chip, device and system
CN106980595B (en) * 2014-12-05 2019-08-13 三星半导体(中国)研究开发有限公司 The multiprocessor communication system and its communication means of shared physical memory
CN105824779A (en) * 2016-03-16 2016-08-03 享拍科技(深圳)有限公司 Data communication method and system used between double cores
DE102016003362A1 (en) * 2016-03-18 2017-09-21 Giesecke+Devrient Currency Technology Gmbh Device and method for evaluating sensor data for a document of value
CN105893320B (en) * 2016-03-29 2019-08-06 浙江大学 A remote task function call method for multi-core processors
CN108228524B (en) * 2016-12-14 2021-07-16 中国航空工业集团公司西安航空计算技术研究所 Inter-core interaction method of multi-core system
CN107127811A (en) * 2017-06-20 2017-09-05 佛山世科智能技术有限公司 Flexible material cutting robot intelligent digital controller and implementation method
CN107562685B (en) * 2017-09-12 2020-06-09 南京国电南自电网自动化有限公司 Method for data interaction between multi-core processor cores based on delay compensation
CN108958953A (en) * 2018-06-29 2018-12-07 南京南瑞继保电气有限公司 A kind of method for message interaction based on multi-core processor
CN110764924A (en) * 2018-07-27 2020-02-07 普天信息技术有限公司 Inter-core communication method and device for multi-core processor
CN109558368A (en) * 2018-11-27 2019-04-02 武汉虹旭信息技术有限责任公司 A kind of multi-core DSP processing chip intercore communication system and its method
CN109857573B (en) * 2018-12-29 2021-03-05 深圳云天励飞技术有限公司 Data sharing method, device, equipment and system
CN110347633B (en) * 2019-07-15 2021-08-06 北京茵沃汽车科技有限公司 Method, device and medium for superimposing vehicle signal state icons based on multiple cores
CN110825690B (en) * 2019-11-14 2022-03-15 北京华捷艾米科技有限公司 Inter-core communication method and device of multi-core processor
CN111190746A (en) * 2019-12-06 2020-05-22 中国航空工业集团公司洛阳电光设备研究所 VxWorks 653-based multi-core partition real-time operating system and communication method
CN111475202A (en) * 2020-03-31 2020-07-31 北京经纬恒润科技有限公司 Inter-core communication method and system based on heterogeneous multi-processing system
CN113535341B (en) * 2020-04-14 2023-09-22 大唐移动通信设备有限公司 Method and device for realizing interrupt communication between CPU cores under Linux
CN113760559A (en) * 2020-06-04 2021-12-07 普天信息技术有限公司 Dual-core communication method and electronic equipment
CN112241329B (en) * 2020-09-28 2021-08-24 深圳市商汤科技有限公司 Monitoring method, device and equipment of recognition engine and storage medium
CN112328533A (en) * 2020-11-09 2021-02-05 哲库科技(上海)有限公司 Multi-core processing system, inter-core communication method thereof, and storage medium
CN112416625B (en) * 2020-11-30 2024-04-09 深信服科技股份有限公司 Copy-free interprocess communication system and method
CN112463715B (en) * 2020-12-09 2025-02-18 北京四方继保工程技术有限公司 A method and device for inter-core communication based on virtual data bus
CN112463710B (en) * 2020-12-10 2024-10-29 西安交通大学 Inter-core communication method and system based on embedded platform
CN112579323B (en) * 2020-12-25 2025-08-01 珠海全志科技股份有限公司 Heterogeneous multi-core asynchronous communication method and device
CN113326149B (en) * 2021-05-27 2022-11-15 展讯通信(天津)有限公司 Inter-core communication method and device of heterogeneous multi-core system
CN113377703B (en) * 2021-06-23 2024-04-09 上海擎昆信息科技有限公司 Inter-core communication method
CN113778706B (en) * 2021-08-18 2023-08-15 北京自动化控制设备研究所 Inter-core communication method of operation system based on AMP architecture
CN114253741B (en) * 2021-12-02 2022-11-08 国汽智控(北京)科技有限公司 Inter-core communication method of multi-core microprocessor and multi-core microprocessor
CN114461408A (en) * 2021-12-28 2022-05-10 东莞市李群自动化技术有限公司 Inter-core interaction method, device, equipment and storage medium of multi-core system
CN114398307A (en) * 2022-01-18 2022-04-26 上海物骐微电子有限公司 Inter-core communication system and method
CN114780505A (en) * 2022-03-29 2022-07-22 深圳市禾望电气股份有限公司 Data and file interaction method
CN117149696A (en) * 2023-08-23 2023-12-01 鹏城实验室 Inter-core communication method, device, electronic equipment and storage medium
CN119988306A (en) * 2024-12-02 2025-05-13 西安翔腾微电子科技有限公司 On-chip inter-core communication system and method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030084269A1 (en) * 2001-06-12 2003-05-01 Drysdale Tracy Garrett Method and apparatus for communicating between processing entities in a multi-processor
US20040039880A1 (en) * 2002-08-23 2004-02-26 Vladimir Pentkovski Method and apparatus for shared cache coherency for a chip multiprocessor or multiprocessor system
US20050027793A1 (en) * 2002-10-08 2005-02-03 Hass David T. Advanced processor with mechanism for packet distribution at high line rate
CN1608249A (en) * 2001-10-22 2005-04-20 太阳微系统有限公司 Multi-core multi-thread processor
CN1609823A (en) * 2003-10-23 2005-04-27 英特尔公司 Method and equipment for maintenance of sharing consistency of cache memory

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030084269A1 (en) * 2001-06-12 2003-05-01 Drysdale Tracy Garrett Method and apparatus for communicating between processing entities in a multi-processor
CN1608249A (en) * 2001-10-22 2005-04-20 太阳微系统有限公司 Multi-core multi-thread processor
US20040039880A1 (en) * 2002-08-23 2004-02-26 Vladimir Pentkovski Method and apparatus for shared cache coherency for a chip multiprocessor or multiprocessor system
US20050027793A1 (en) * 2002-10-08 2005-02-03 Hass David T. Advanced processor with mechanism for packet distribution at high line rate
CN1609823A (en) * 2003-10-23 2005-04-27 英特尔公司 Method and equipment for maintenance of sharing consistency of cache memory

Also Published As

Publication number Publication date
CN1904873A (en) 2007-01-31

Similar Documents

Publication Publication Date Title
CN100458757C (en) Inter core communication method and apparatus for multi-core processor in embedded real-time operating system
CN104915151B (en) A kind of memory excess distribution method that active is shared in multi-dummy machine system
US7124255B2 (en) Message based inter-process for high volume data
CN112422615B (en) A communication method and device
Rashid et al. Accent: A communication oriented network operating system kernel
CN103827829B (en) System and method for provisioning and managing message queues for multi-node applications in a middleware machine environment
CN111290827B (en) Data processing methods, devices and servers
JPS61289458A (en) Inter-process communication apparatus
Dally The J-machine: System support for Actors
WO2012083188A1 (en) Distributed computing architecture
US20040252709A1 (en) System having a plurality of threads being allocatable to a send or receive queue
CN118132286A (en) Method, device and system for communication between multiple processes
US7962926B2 (en) Method, system, and program storage device for generating a retry message when a thread in a real-time application is unavailable to process a request to utilize the real-time application
US9069592B2 (en) Generic transport layer mechanism for firmware communication
CN107133103A (en) Memory management system and method for data streaming computing
Liu et al. Fuyao: Dpu-enabled direct data transfer for serverless computing
US5495614A (en) Interface control process between using programs and shared hardware facilities
CN1707462B (en) Logical partition data system and method for transferring data
CN104769553A (en) System and method for supporting work sharing muxing in a cluster
JPS61289457A (en) Data managing apparatus for decentralized processing system
CN114510436B (en) A storage device
CN113826081A (en) Method and computing system for transmitting messages in computing system
CN116841952A (en) Inter-core communication systems, methods, devices, equipment, chips and readable storage media
Liu et al. Memory-centric communication mechanism for real-time autonomous navigation applications
Giloi et al. An IPC protocol and its hardware realization for a high-speed distributed multicomputer system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CX01 Expiry of patent term

Granted publication date: 20090204

CX01 Expiry of patent term