CN105426260B - A kind of transparent interprocess communication system and method for supporting distributed system - Google Patents

A kind of transparent interprocess communication system and method for supporting distributed system Download PDF

Info

Publication number
CN105426260B
CN105426260B CN201510725014.4A CN201510725014A CN105426260B CN 105426260 B CN105426260 B CN 105426260B CN 201510725014 A CN201510725014 A CN 201510725014A CN 105426260 B CN105426260 B CN 105426260B
Authority
CN
China
Prior art keywords
message
link
module
scheduler module
node
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.)
Active
Application number
CN201510725014.4A
Other languages
Chinese (zh)
Other versions
CN105426260A (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.)
China Academy of Launch Vehicle Technology CALT
Beijing Aerospace Automatic Control Research Institute
Original Assignee
China Academy of Launch Vehicle Technology CALT
Beijing Aerospace Automatic Control Research Institute
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 China Academy of Launch Vehicle Technology CALT, Beijing Aerospace Automatic Control Research Institute filed Critical China Academy of Launch Vehicle Technology CALT
Priority to CN201510725014.4A priority Critical patent/CN105426260B/en
Publication of CN105426260A publication Critical patent/CN105426260A/en
Application granted granted Critical
Publication of CN105426260B publication Critical patent/CN105426260B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues

Abstract

The invention discloses a kind of transparent interprocess communication system and methods for supporting distributed system, the system includes multiple communication nodes, and each node includes scheduler module 11 and scheduler module 12, Communications Processor Module, link send service module, link receives service module;The method includes the design of unique process ID number, the message passing mechanism based on process ID number, messaging path through street by the quick transmission of, message, and cross-node inter-process communication mechanisms based on " intra-node interprocess communication+link, which transmits and receives, to be serviced ".The system and method efficiently realizes the message transmission between process, has unified intra-node interprocess communication and cross-node interprocess communication, realizes the support to distributed treatment.

Description

A kind of transparent interprocess communication system and method for supporting distributed system
Technical field
The present invention relates to a kind of transparent interprocess communication system and methods for supporting distributed system, belong in computer The technical field of interprocess communication is used for space industry.
Background technology
In recent years, it in built-in fields such as space flight, becomes increasingly complex with the function of system, uniprocessor embedded system Demand is had been unable to meet, multi-processor Embedded System occurs, for supporting the distribution of multi-processor Embedded System real When operating system research it is also more and more.Interprocess communication (IPC) is the basic function and distributed system of operating system Core.Multi-processor Embedded System has following features compared with traditional distributed system:(1) limited storage space and Stringent to requirement of real-time, the interprocess communication for the system must take into account execution efficiency, real-time and EMS memory occupation and ask Topic, i.e. communication efficiency problem;(2) the physical communication mode type between multiprocessor is various, that is, communicates transparent problem.It supports more The interprocess communication of processor embedded system has to consider both the above feature.
Mainly there is inter-process communication mechanisms in existing operating system:Pipeline, semaphore, message queue, shared drive etc.. The inter-process communication mechanisms of distributed system are supported mainly to have:Socket (Socket), RPC, COM, Web service and message-oriented Middleware etc..Socket is inter-process communication mechanisms between traditional distributed system interior joint, is needed by protocol stack Reason, efficiency are low.Remote procedure call is one of most common, most effective node communication mode, it conceals bottom communication mistake Journey is widely used, and is the basis of many distributed systems.
In above-mentioned inter-process communication mechanisms, inter-process communication mechanisms are not supported to lead between cross operating system process in operating system Letter causes to communicate the inadequate problem of transparency;Support the network that the inter-process communication mechanisms of distributed system will pass through bottom logical Letter, protocol stack processing, are unsatisfactory for the high real-time feature of distribution embedded system, also can not will be in operating system and across operation System interprocess communication is united.
Invention content
The technology of the present invention solves the problems, such as:It overcomes the shortage of prior art, proposition is a kind of to support the transparent of distributed system Interprocess communication system and method, the high grade of transparency, efficient can not be met simultaneously by solving existing inter-process communication techniques Problem has unified communication and cross operating system interprocess communication between operating system internal process, has met the two of distributed real time IPC A key property:The transparency and real-time.
Technical solution of the invention is:A kind of transparent interprocess communication system for supporting distributed system, including:It is more A communication node, each node include scheduler module 11 and scheduler module 12, Communications Processor Module, link send scheduler module, Link receiving process module;When node receives the message that other nodes in communication system are sent, which only needs one Scheduler module 11 regard the scheduler module 11 in the node for receiving the message that other nodes in communication system are sent as process mould Block 21 is named as 21 module of scheduler module;
A unique process ID number is set for each process, in node between interprocess communication or node when interprocess communication, Information receiving and transmitting is carried out by mailing address of process ID number;
Process ID number needs meet condition:1. process ID number is specified when creating the process by user, ensure the ID number It is unique in a communication system;2. it is that process ID is segmented for each node, the process ID number on each node Belong to jack per line section;
Communications Processor Module is scheduler module 11, scheduler module 12, link transmission scheduler module and link receiving process mould Block creates first in, first out type (FIFO) receiving queue, is used to store the message received, message includes message header and message Body, message header include:Send process ID, receiving process ID and message body length;
Link sends scheduler module and is responsible for other nodes transmission message of the node by communication link into communication system, The process ID number that communication link link sends scheduler module executive process is named, i.e. link No.;Link receiving process module It is responsible for receiving the message that other nodes in communication system are sent by communication link to the node;Each link sends process mould Block executes a transmission process, and the receiving process ID number set in the corresponding direction transmission process message to be sent is corresponding The physical link of 21 place node of scheduler module;
A routing table is created in the Communications Processor Module of each node, which includes receiving process ID number institute Belong to number segment and from node where the process of transmission to the link No. of the communication link of node where the receiving process;If receive into Journey with send process in the same node, then the corresponding communication link of the link No. be Communications Processor Module itself, i.e., into Journey module 12 sends messages to Communications Processor Module and is forwarded in first in, first out type (FIFO) receiving queue of scheduler module 11;Such as Fruit receiving process and transmission process be not in same node, then communication link is the process ID that link sends that scheduler module executes Number, i.e. link No., corresponding communication link;
In a node, when scheduler module 12 needs to send message, first into one piece of Communications Processor Module application Deposit region, Communications Processor Module distributes one piece of region of memory according to the application of scheduler module 12, as message deposit carrier, and handle The region of memory address of distribution, i.e. message carrier address feed back to scheduler module 12, and scheduler module 12 is according to the message fed back to The ID number of transmission process, the ID number of receiving process and message body length is written the message header for sending message in bearer address, need Message body is written in the information content to be sent, and then message carrier address is passed to Communications Processor Module by scheduler module 12;
Communications Processor Module obtains the ID number of the receiving process in the message header of the message, root according to message carrier address According to the ID number of the receiving process, searched from node where node to the receiving process where transmission process in the routing table of establishment Communication link link No., if the corresponding communication link of the link No. be Communications Processor Module itself, Communications Processor Module First in, first out type (FIFO) receiving queue that message carrier address is sent to scheduler module 11, and is stored in scheduler module 11 In, if scheduler module 11 such as is at the message status to be received, scheduler module 11 is made to resume work state;If the link No. pair The communication link answered is the process ID number that link sends scheduler module executive process, i.e. communication link corresponding to link No., is led to Message carrier address is sent to link and sends scheduler module by letter processing module, and the elder generation being stored in link transmission scheduler module Enter first to go out in type (FIFO) receiving queue, then the link, which sends scheduler module and sent in scheduler module from the link, first enters elder generation Go out and read message carrier address in type (FIFO) receiving queue, and by the corresponding message in message carrier address, passes through physical link It is sent to the link receiving process module of the node where scheduler module 21, if the link receiving process module is in etc. waiting Message status is received, the link receiving process module recovery is made to be in working condition;The link of node where scheduler module 21 receives One piece of region of memory of Communications Processor Module application of node where from scheduler module to scheduler module 21, the Communications Processor Module root According to the application of the link receiving process module of the node where scheduler module 21, one piece of region of memory of distribution is carried as message deposit Body, and the region of memory address of distribution, i.e. message carrier address, the link for feeding back to the node where scheduler module 21 receives Scheduler module, the link receiving process module of the node where scheduler module 21 according to the message carrier address fed back to, from The message deposit carrier for the message write-in distribution that physical link receives, then the link of the node where scheduler module 21 receive into Journey module is transmitted to process 21 after message carrier address being passed to the Communications Processor Module of the node where scheduler module 21;
When scheduler module 11 receives the message that this node internal process 12 transmits, the first in, first out of scheduler module 11 is judged Whether there is message carrier address in type (FIFO) receiving queue, if there being message carrier address, scheduler module 11 is from process Message carrier address is read in first in, first out type (FIFO) receiving queue of module 11, according to the message carrier address from process mould The Communications Processor Module of 11 place node of block reads message;Otherwise, scheduler module 11 does not work, and wait for the arrival of news deposit scheduler module In 11 first in, first out type (FIFO) receiving queue, the message sink of transparent interprocess communication in node is completed;
When the message that the scheduler module 12 in other nodes that scheduler module 21 receives in communication system is sent, judge Whether there is message carrier address in first in, first out type (FIFO) receiving queue of scheduler module 21, if with having message carrier Location, scheduler module 21 reads message carrier address from first in, first out type (FIFO) receiving queue of scheduler module 11, according to this Message is read from the Communications Processor Module of 21 place node of scheduler module in message carrier address;Otherwise, scheduler module 21 does not work, In first in, first out type (FIFO) receiving queue of deposit scheduler module 21 that waits for the arrival of news, transparent interprocess communication between completion node Message sink.
A kind of transparent inter-process communication methods for supporting distributed system, steps are as follows:
(1) it is each process one unique process ID number of setting, interprocess communication between interprocess communication or node in node When, carry out information receiving and transmitting by mailing address of process ID number;
(2) process ID number needs meet condition:1. process ID number is specified when creating the process by user, ensure the ID Number it is unique in a communication system;2. it is that process ID is segmented for each node, the process ID on each node Number belong to jack per line section;
(3) Communications Processor Module is scheduler module 11, scheduler module 12, link transmission scheduler module and link receiving process One first in, first out type (FIFO) receiving queue of module creation, is used to store the message received, and message includes message header and disappears Body is ceased, message header includes:Send process ID, receiving process ID and message body length;
(4) link send scheduler module be responsible for the node by other nodes from communication link to communication system transmission disappear Breath, the process ID number that communication link link sends scheduler module executive process are named, i.e. link No.;Link receiving process mould Block is responsible for receiving the message that other nodes in communication system are sent by communication link to the node, and the message received It forwards;Each link sends scheduler module and executes a transmission process, and what corresponding direction transmission process to be sent disappears The physical link of the corresponding 21 place node of scheduler module of receiving process ID number set in breath;Each link receiving process module Execute a receiving process;
(5) routing table is created in the Communications Processor Module of each node, which includes receiving process ID Number segment belonging to number and from node where the process of transmission to the link No. of the communication link of node where the receiving process;If connect Journey is taken in transmission process in the same node, then the corresponding communication link of the link No. is Communications Processor Module itself, I.e. scheduler module 12 sends messages to first in, first out type (FIFO) receiving queue that Communications Processor Module is forwarded to scheduler module 11 In;If receiving process with send process not in same node, communication link be link send scheduler module execute into Journey ID number, i.e. link No., corresponding communication link;
(6) in a node, when scheduler module 12 needs to send message, first to one piece of Communications Processor Module application Region of memory, Communications Processor Module distributes one piece of region of memory according to the application of scheduler module 12, as message deposit carrier, and The region of memory address of distribution, i.e. message carrier address, scheduler module 12 is fed back to, scheduler module 12 disappears according to what is fed back to Bearer address is ceased, the ID number of transmission process, the ID number of receiving process and message body length are written the message header for sending message, Need the information content sent that message body is written, then message carrier address is passed to Communications Processor Module by scheduler module 12;
(7) Communications Processor Module obtains the ID number of the receiving process in the message header of the message according to message carrier address, According to the ID number of the receiving process, the section where node to the receiving process where transmission process is searched in the routing table of establishment The link No. of the communication link of point, if the corresponding communication link of the link No. is Communications Processor Module itself, communication process mould Message carrier address is sent to scheduler module 11 by block, and the first in, first out type (FIFO) being stored in scheduler module 11 receives team In row, if scheduler module 11 such as is at the message status to be received, scheduler module 11 is made to resume work state;If the link No. Corresponding communication link sends the process ID number of scheduler module executive process, i.e. communication link corresponding to link No. for link, Message carrier address is sent to link and sends scheduler module by Communications Processor Module, and is stored in link and is sent in scheduler module In first in, first out type (FIFO) receiving queue, then the link sends scheduler module and sends first entering in scheduler module from the link First go out and read message carrier address in type (FIFO) receiving queue, and by the corresponding message in message carrier address, passes through physics chain Road is sent to the link receiving process module of the node where scheduler module 21, is waited for if the link receiving process module is in Message status is received, the link receiving process module recovery is made to be in working condition;The link of node where scheduler module 21 connects Receive one piece of region of memory of Communications Processor Module application of the node where scheduler module to scheduler module 21, the Communications Processor Module The application of the link receiving process module of node where scheduler module 21, one piece of region of memory of distribution is as message deposit Carrier, and the region of memory address of distribution, i.e. message carrier address, the link for feeding back to the node where scheduler module 21 connects Receive scheduler module, the link receiving process module of the node where scheduler module 21 according to the message carrier address fed back to, The message deposit carrier of the message write-in distribution received from physical link, then the link reception of the node where scheduler module 21 Scheduler module is transmitted to process 21 after message carrier address being passed to the Communications Processor Module of the node where scheduler module 21;
(8) when scheduler module 11 receives the message that this node internal process 12 transmits, judge first entering for scheduler module 11 First go out in type (FIFO) receiving queue and whether have message carrier address, if there being message carrier address, scheduler module 11 from Message carrier address is read in first in, first out type (FIFO) receiving queue of scheduler module 11, according to the message carrier address from into The Communications Processor Module of 11 place node of journey module reads message;Otherwise, scheduler module 11 does not work, and wait for the arrival of news deposit process In first in, first out type (FIFO) receiving queue of module 11, the message sink of transparent interprocess communication in node is completed;
(9) when the message that the scheduler module 12 in other nodes that scheduler module 21 receives in communication system is sent, Judge whether there is message carrier address in first in, first out type (FIFO) receiving queue of scheduler module 21, if there being message load Body address, scheduler module 21 read message carrier address, root from first in, first out type (FIFO) receiving queue of scheduler module 11 According to the message carrier address message is read from the Communications Processor Module of 21 place node of scheduler module;Otherwise, scheduler module 21 is not Work waits for the arrival of news and is stored in first in, first out type (FIFO) receiving queue of scheduler module 21, between completion node between transparent process The message sink of communication.
In the step (2), in a node, if process is scheduled based on priority, and a priority can only A process is created, then the ID number of process can be made of node number+process priority.
In the step (4), in the higher distributed system of requirement of real-time, in node link receiving process module That execute can be interrupt service routine (ISR), correspondingly, its process ID number is node number+interrupt number.
The advantages of the present invention over the prior art are that:
(1) present invention has unified node in interface layer compared with prior art by the step (6), (8) and (9) in method Communication and cross-node interprocess communication between internal process, support distributed system, are provided a convenient for user's use;
(2) step (6) and (7), message carrier of the invention by method is located inside Communications Processor Module, passes through biography Message addresses are passed to realize the transmission of message, compared with prior art, avoid the content copy twice of interprocess communication, Ke Yi great It is big to improve communication efficiency;
(3) present invention is by the step (7) in method, and cross-node interprocess communication is by interprocess communication in two minor nodes (12 → link of scheduler module sends scheduler module, link receiving process module → scheduler module 21) and a link communication group At making full use of existing processing function, the realization of cross-node interprocess communication can be simplified;
(4) present invention sends scheduler module and link receiving process module come pipe by the step (4) in method with link The transmitting-receiving for managing physical link data, realizes the software implementation and abstract of physical link, is provided for cross-node interprocess communication It is convenient.
(5) step (2) and (5) of the invention by method, is segmented process ID number, routing table is with receiving process module The affiliated number segment of process ID number be index, avoid routing table to going to the description of each receiving process module path, can be with Consumption of the routing table to memory headroom is reduced, the path searching time is reduced, to improve communication efficiency;
(6) in system of the present invention, the information flow trend of intra-node interprocess communication is scheduler module 12 → communication The information flow trend of processing module → scheduler module 11, cross-node interprocess communication is 12 → Communications Processor Module of scheduler module (being located at node 1) → link sends scheduler module (being located at node 1) → link receiving process module (being located at node 2) → mailing address Module (being located at node 2) → scheduler module 21 is managed, the information receiving and transmitting of scheduler module is only interacted with Communications Processor Module, embodied The transparency of interprocess communication.
Description of the drawings
Fig. 1 is the transparent interprocess communication system schematic of the present invention;
Fig. 2 is a kind of process ID number structural schematic diagram of the present invention;
Fig. 3 is message structure schematic diagram of the present invention;
Fig. 4 is router-table structure schematic diagram of the present invention.
Specific implementation mode
The present invention is described in detail with specific embodiment below in conjunction with the accompanying drawings.
A kind of transparent interprocess communication system for supporting distributed system, as shown in Figure 1, including:Multiple communication nodes, often A node include scheduler module 11 and scheduler module 12 (node 1 in as shown in Figure 1), Communications Processor Module, link send into Journey module, link receiving process module;When node receives the message that other nodes in communication system are sent, which only needs A scheduler module 11 is wanted, by 11 conduct of scheduler module in the node for receiving the message that other nodes in communication system are sent Scheduler module 21 in reception system in the node of other node messages, that is, be named as 21 module of scheduler module;(in reception system The node of other node messages can only need the work of scheduler module, one in scheduler module 11 or scheduler module 12 into Journey module, in order to distinguish, as the scheduler module 21 in the node of other node messages in reception system, in as shown in Figure 1 Node 2), save the resource of node.
Scheduler module 11 runs a consumer process, undertakes the role of message sink;Scheduler module 12 runs a user Process undertakes the role of message transmission, and the function of Communications Processor Module is realized by operating system, and process control block (PCB) is located at operation and is In system, for the system resource for describing running state of process and being occupied, operating status may include waiting for and operating status;Chain Road sends scheduler module operation link and sends service processes, and the message that other processes are sent is responsible for be forwarded by physical link It goes out;Link receiving process module runs link and receives service processes, be responsible for sending physical link to receive message, and receiving Message is transmitted to receiving process.One intra-node only allows that there are one Communications Processor Module, i.e., an operation system can only be run System.
The means of communication according to the transparent interprocess communication system of above-mentioned support distributed system are as follows:
A kind of transparent inter-process communication methods for supporting distributed system realize that steps are as follows:
(1) it is each process one unique process ID number of setting, interprocess communication between interprocess communication or node in node When, carry out information receiving and transmitting by mailing address of process ID number.In a communication system, to unify intra-node interprocess communication Interprocess communication between different nodes, the foundation of message transmission must cross operating system and exist.Handle exists only in operation Internal system can not use between different operating system, therefore be the inter-process communication mechanisms for communicating foundation with handle, such as manage Road, semaphore, message queue, shared drive etc. do not support the interprocess communication of cross operating system.Process ID number can be across behaviour Make system presence, carries out information receiving and transmitting by mailing address of process ID number, be that cross operating system interprocess communication provides premise Condition.
(2) process ID number needs meet condition:1. process ID number is specified when creating the process by user, ensure the ID Number it is unique in a communication system, prevents message dilivery from ambiguity occur;2. being carried out for process ID for each node It is segmented, the process ID number on each node belongs to jack per line section, is convenient for mailing address management;3. particularly, in a node, If operating system is based on priority and carries out process scheduling, and a priority can only create a process, then the ID of process It number can be made of node number+process priority.Fig. 2 gives a kind of preferred process ID number design, by 32 integer datas Composition, wherein bit0-7 are process priority, and bit8-15 is node serial number, and bit16-23 is left unused, and are full 0, bit24-31 For physical link, for example 0 represents communication, 1 representative in core and is transmitted with serial ports, and 2 represent dual port RAM transmission ... from the receiving process The node where the process can be directly parsed in ID number, the physical connection mode with this node is conducive to improve ID routings Efficiency.
(3) Communications Processor Module is scheduler module 11, scheduler module 12, link transmission scheduler module and link receiving process One first in, first out type (FIFO) receiving queue of module creation, is used to store the message received, and message includes message header and disappears Body is ceased, message header includes:Send process ID, receiving process ID and message body length, as shown in figure 3, in an operating system, with into Program-controlled clamp dog (PCB) describes a process, and records the system resource that the process is occupied, therefore can be in process control block (PCB) Create message first in, first out type (FIFO) receiving queue.From another viewpoint, the message received by process, belongs to the process The resource occupied, therefore establish message sink queue in the pcb and be also reasonable.
(4) link send scheduler module be responsible for the node by other nodes from communication link to communication system transmission disappear Breath, the process ID number that communication link link sends scheduler module executive process are named, i.e. link No.;Link receiving process mould Block is responsible for receiving the message that other nodes in communication system are sent by communication link to the node, and the message received It forwards;Each link sends scheduler module and executes a transmission process, and what corresponding direction transmission process to be sent disappears The physical link of the corresponding 21 place node of scheduler module of receiving process ID number set in breath;Each link receiving process module Execute a receiving process;In the higher distributed system of requirement of real-time, executed in node link receiving process module Can be interrupt service routine (ISR), correspondingly, its process ID number be node number+interrupt number.Scheduler module is sent with link The transmitting-receiving that physical link data are managed with link receiving process module realizes the software implementation and abstract of physical link, is Cross-node interprocess communication provides a convenient.
(5) routing table is created in the Communications Processor Module of each node, which includes receiving process ID Number segment belonging to number and from node where the process of transmission to the link No. of the communication link of node where the receiving process, such as Fig. 4 It is shown;If receiving process is with the process of transmission in the same node, the corresponding communication link of the link No. is mailing address Module itself is managed, i.e. scheduler module 12 sends messages to the first in, first out type that Communications Processor Module is forwarded to scheduler module 11 (FIFO) in receiving queue;If receiving process with send process not in same node, communication link be link send into The process ID number that journey module executes, i.e. link No., corresponding communication link;Routing table is with the process ID number institute of receiving process module It is index to belong to number segment, avoids routing table to going to the description of each receiving process module path, can reduce routing table pair The consumption of memory headroom reduces the path searching time, to improve communication efficiency.
(6) in a node, when scheduler module 12 needs to send message, first to one piece of Communications Processor Module application Region of memory, Communications Processor Module distributes one piece of region of memory according to the application of scheduler module 12, as message deposit carrier, and The region of memory address of distribution, i.e. message carrier address, scheduler module 12 is fed back to, scheduler module 12 disappears according to what is fed back to Bearer address is ceased, the ID number of transmission process, the ID number of receiving process and message body length are written the message header for sending message, Need the information content sent that message body is written, then message carrier address is passed to Communications Processor Module by scheduler module 12;
(7) Communications Processor Module obtains the ID number of the receiving process in the message header of the message according to message carrier address, According to the ID number of the receiving process, the section where node to the receiving process where transmission process is searched in the routing table of establishment The link No. of the communication link of point, if the corresponding communication link of the link No. is Communications Processor Module itself, communication process mould Message carrier address is sent to scheduler module 11 by block, and the first in, first out type (FIFO) being stored in scheduler module 11 receives team In row, if scheduler module 11 such as is at the message status to be received, scheduler module 11 is made to resume work state;If the link No. Corresponding communication link sends the process ID number of scheduler module executive process, i.e. communication link corresponding to link No. for link, Message carrier address is sent to link and sends scheduler module by Communications Processor Module, and is stored in link and is sent in scheduler module In first in, first out type (FIFO) receiving queue, then the link sends scheduler module and sends first entering in scheduler module from the link First go out and read message carrier address in type (FIFO) receiving queue, and by the corresponding message in message carrier address, passes through physics chain Road is sent to the link receiving process module of the node where scheduler module 21, is waited for if the link receiving process module is in Message status is received, the link receiving process module recovery is made to be in working condition;The link of node where scheduler module 21 connects Receive one piece of region of memory of Communications Processor Module application of the node where scheduler module to scheduler module 21, the Communications Processor Module The application of the link receiving process module of node where scheduler module 21, one piece of region of memory of distribution is as message deposit Carrier, and the region of memory address of distribution, i.e. message carrier address, the link for feeding back to the node where scheduler module 21 connects Receive scheduler module, the link receiving process module of the node where scheduler module 21 according to the message carrier address fed back to, The message deposit carrier of the message write-in distribution received from physical link, then the link reception of the node where scheduler module 21 Scheduler module is transmitted to process 21 after message carrier address being passed to the Communications Processor Module of the node where scheduler module 21;
Cross-node interprocess communication by interprocess communication in two minor nodes (12 → link of scheduler module send scheduler module, Link receiving process module → scheduler module 21) and a link communication composition, existing processing function is made full use of, can be simplified The realization of cross-node interprocess communication;
(8) when scheduler module 11 receives the message that this node internal process 12 transmits, judge first entering for scheduler module 11 First go out in type (FIFO) receiving queue and whether have message carrier address, if there being message carrier address, scheduler module 11 from Message carrier address is read in first in, first out type (FIFO) receiving queue of scheduler module 11, according to the message carrier address from into The Communications Processor Module of 11 place node of journey module reads message;Otherwise, scheduler module 11 does not work, and wait for the arrival of news deposit process In first in, first out type (FIFO) receiving queue of module 11, the message sink of transparent interprocess communication in node is completed;
(9) when the message that the scheduler module 12 in other nodes that scheduler module 21 receives in communication system is sent, Judge whether there is message carrier address in first in, first out type (FIFO) receiving queue of scheduler module 21, if there being message load Body address, scheduler module 21 read message carrier address, root from first in, first out type (FIFO) receiving queue of scheduler module 11 According to the message carrier address message is read from the Communications Processor Module of 21 place node of scheduler module;Otherwise, scheduler module 21 is not Work waits for the arrival of news and is stored in first in, first out type (FIFO) receiving queue of scheduler module 21, between completion node between transparent process The message sink of communication.
In above-mentioned message process, message carrier is located inside Communications Processor Module, i.e. operating system nucleus space, into Journey is directly written and read the message carrier of kernel spacing, by transmitting message carrier address, the message transmission between realization process, Entire message is avoided from the copy twice of " user's space → kernel spacing → user's space ", shortens call duration time, is improved Efficiency.
The present invention has been used in " war star " embedded real-time operating system of space flight etc., carries out a message transmission and is spent Time, measured performance is as follows in 4 core DSP FT-Q6713 of domestic isomery:
It is delicate (unrelated with message-length) to be less than 3 for interprocess communication in node
About 40 delicate/KB of interprocess communication between node (physical link is shared data pond), in node interprocess communication and Interprocess communication speed improves several times between node, realizes high efficiency.
The present invention meets rigors of the Aerospace Control system to real-time, such as:Utilize technical scheme of the present invention System:" war star " embedded real-time operating system+FT-Q6713 has been applied in several space flight models, solves interprocess communication Meet the high grade of transparency, efficient problem simultaneously, achieves good effect.
The content that description in the present invention is not described in detail belongs to the known technology of those skilled in the art.

Claims (4)

1. a kind of transparent interprocess communication system for supporting distributed system, it is characterised in that including:Multiple communication nodes, each Node includes that scheduler module 11 and scheduler module 12, Communications Processor Module, link send scheduler module, link receiving process mould Block;When node receives the message that other nodes in communication system are sent, which only needs a scheduler module 11, will connect The scheduler module 11 received in the node for the message that other nodes in communication system are sent is used as scheduler module 21;
Set a unique process ID number for each process, in node between interprocess communication or node when interprocess communication, with into Journey ID number is that mailing address carries out information receiving and transmitting;
Process ID number needs meet condition:1. process ID number is specified when creating the process by user, ensure the ID number one It is unique in a communication system;2. being that process ID is segmented for each node, the process ID number on each node belongs to Jack per line section;
Communications Processor Module is scheduler module 11, scheduler module 12, link sends scheduler module and link receiving process module is created A first in, first out type FIFO receiving queue is built, the message received is used to store, message includes message header and message body, message Head include:Send process ID, receiving process ID and message body length;
Link sends scheduler module and is responsible for other nodes transmission message of the node by communication link into communication system, this is logical Believe that link link sends the process ID number name of scheduler module executive process, i.e. link No.;Link receiving process module is responsible for Receive the message that other nodes in communication system are sent by communication link to the node;Each link sends scheduler module and holds One transmission process of row, corresponding one is directed toward the corresponding process of receiving process ID number set in the transmission process message to be sent The physical link of 21 place node of module;
A routing table is created in the Communications Processor Module of each node, which includes affiliated number of receiving process ID number Code section and from node where the process of transmission to the link No. of the communication link of node where the receiving process;If receiving process with Transmission process is in the same node, then the corresponding communication link of the link No. is Communications Processor Module itself, i.e. process mould Block 12 sends messages to Communications Processor Module and is forwarded in the first in, first out type FIFO receiving queues of scheduler module 11;If received Process and transmission process be not in same node, then communication link is the process ID number that link sends that scheduler module executes, i.e. chain Lu Hao, corresponding communication link;
In a node, when scheduler module 12 needs to send message, first to one piece of memory field of Communications Processor Module application Domain, Communications Processor Module distribute one piece of region of memory according to the application of scheduler module 12, as message deposit carrier, and distribution Region of memory address, i.e. message carrier address feeds back to scheduler module 12, scheduler module 12 is according to the message carrier fed back to The ID number of transmission process, the ID number of receiving process and message body length is written the message header for sending message, needing to send out in address Message body is written in the information content sent, and then message carrier address is passed to Communications Processor Module by scheduler module 12;
Communications Processor Module obtains the ID number of the receiving process in the message header of the message, according to this according to message carrier address The ID number of receiving process is searched in the routing table of establishment from the logical of node where node to the receiving process where transmission process Believe the link No. of link, if the corresponding communication link of the link No. is Communications Processor Module itself, Communications Processor Module will disappear In the first in, first out type FIFO receiving queues that breath bearer address is sent to scheduler module 11, and is stored in scheduler module 11, such as Fruit scheduler module 11 such as is at the message status to be received, and scheduler module 11 is made to resume work state;If the link No. is corresponding Communication link is the process ID number that link sends scheduler module executive process, i.e. communication link corresponding to link No., mailing address Message carrier address is sent to link and sends scheduler module by reason module, and is stored in link and is sent in scheduler module and first enter elder generation Go out in type FIFO receiving queues, then the link sends scheduler module from the first in, first out type in link transmission scheduler module Message carrier address is read in FIFO receiving queues, and by the corresponding message in message carrier address, is sent to by physical link The link receiving process module of node where scheduler module 21, if the link receiving process module such as is at the message to be received State makes the link receiving process module recovery be in working condition;The link receiving process mould of node where scheduler module 21 One piece of region of memory of Communications Processor Module application of node where from block to scheduler module 21, the Communications Processor Module is according to process The application of the link receiving process module of node where module 21 distributes one piece of region of memory as message deposit carrier, and The region of memory address of distribution, i.e. message carrier address, the link receiving process of the node where scheduler module 21 is fed back to Module, the link receiving process module of the node where scheduler module 21 is according to the message carrier address fed back to, from physics The message deposit carrier of distribution is written in the message that link receives, then the link receiving process mould of the node where scheduler module 21 Block is transmitted to process 21 after message carrier address being passed to the Communications Processor Module of the node where scheduler module 21;
When scheduler module 11 receives the message that this node internal process 12 transmits, the first in, first out type of scheduler module 11 is judged Whether message carrier address is had in FIFO receiving queues, if there being message carrier address, scheduler module 11 is from scheduler module Message carrier address is read in 11 first in, first out type FIFO receiving queues, according to the message carrier address from 11 institute of scheduler module Message is read in the Communications Processor Module of node;Otherwise, scheduler module 11 does not work, the elder generation for the deposit scheduler module 11 that waits for the arrival of news Enter first to go out in type FIFO receiving queues, completes the message sink of transparent interprocess communication in node;
When the message that the scheduler module 12 in other nodes that scheduler module 21 receives in communication system is sent, process is judged Whether there is message carrier address in the first in, first out type FIFO receiving queues of module 21, if there being message carrier address, into Journey module 21 reads message carrier address from the first in, first out type FIFO receiving queues of scheduler module 11, according to the message carrier Message is read from the Communications Processor Module of 21 place node of scheduler module in address;Otherwise, scheduler module 21 does not work, and waits for the arrival of news It is stored in the first in, first out type FIFO receiving queues of scheduler module 21, completes the message sink of transparent interprocess communication between node.
2. a kind of transparent inter-process communication methods for supporting distributed system, it is characterised in that steps are as follows:
(1) it is each process one unique process ID number of setting, in node between interprocess communication or node when interprocess communication, with Process ID number is that mailing address carries out information receiving and transmitting;
(2) process ID number needs meet condition:1. process ID number is specified when creating the process by user, ensure that the ID number exists It is unique in one communication system;2. it is that process ID is segmented for each node, the process ID number category on each node In jack per line section;
(3) Communications Processor Module is scheduler module 11, scheduler module 12, link transmission scheduler module and link receiving process module A first in, first out type FIFO receiving queue is created, is used to store the message received, message includes message header and message body, is disappeared Ceasing head includes:Send process ID, receiving process ID and message body length;
(4) link transmission scheduler module is responsible for other nodes transmission message of the node by communication link into communication system, The process ID number that communication link link sends scheduler module executive process is named, i.e. link No.;Link receiving process module It is responsible for receiving the message that other nodes in communication system are sent by communication link to the node, and the message received is turned It sends out;Each link sends scheduler module and executes a transmission process, the corresponding direction transmission process message to be sent The physical link of the corresponding 21 place node of scheduler module of receiving process ID number of middle setting;Each link receiving process module is held One receiving process of row;
(5) routing table is created in the Communications Processor Module of each node, which includes receiving process ID number institute Belong to number segment and from node where the process of transmission to the link No. of the communication link of node where the receiving process;If receive into Journey with send process in the same node, then the corresponding communication link of the link No. be Communications Processor Module itself, i.e., into Journey module 12 sends messages to Communications Processor Module and is forwarded in the first in, first out type FIFO receiving queues of scheduler module 11;If Receiving process and transmission process be not in same node, then communication link is the process ID number that link sends that scheduler module executes, That is link No., corresponding communication link;
(6) in a node, when scheduler module 12 needs to send message, first to one piece of memory of Communications Processor Module application Region, Communications Processor Module distribute one piece of region of memory according to the application of scheduler module 12, and as message deposit carrier, and handle divides The region of memory address matched, i.e. message carrier address, feed back to scheduler module 12, and scheduler module 12 is carried according to the message fed back to The ID number of transmission process, the ID number of receiving process and message body length is written the message header for sending message in body address, needs Message body is written in the information content of transmission, and then message carrier address is passed to Communications Processor Module by scheduler module 12;
(7) Communications Processor Module obtains the ID number of the receiving process in the message header of the message according to message carrier address, according to The ID number of the receiving process is searched in the routing table that step (5) creates from node where the process of transmission to the receiving process institute In the link No. of the communication link of node, if the corresponding communication link of the link No. is Communications Processor Module itself, mailing address Message carrier address is sent to scheduler module 11 by reason module, and the first in, first out type FIFO being stored in scheduler module 11 is received In queue, if scheduler module 11 such as is at the message status to be received, scheduler module 11 is made to resume work state;If the link Number corresponding communication link is the process ID number that link sends scheduler module executive process, i.e. communication chain corresponding to link No. Message carrier address is sent to link and sends scheduler module by road, Communications Processor Module, and is stored in link and is sent scheduler module In first in, first out type FIFO receiving queues in, then the link send scheduler module from the link send scheduler module in elder generation Enter first to go out and read message carrier address in type FIFO receiving queues, and by the corresponding message in message carrier address, passes through physics chain Road is sent to the link receiving process module of the node where scheduler module 21, is waited for if the link receiving process module is in Message status is received, the link receiving process module recovery is made to be in working condition;The link of node where scheduler module 21 connects Receive one piece of region of memory of Communications Processor Module application of the node where scheduler module to scheduler module 21, the Communications Processor Module The application of the link receiving process module of node where scheduler module 21, one piece of region of memory of distribution is as message deposit Carrier, and the region of memory address of distribution, i.e. message carrier address, the link for feeding back to the node where scheduler module 21 connects Receive scheduler module, the link receiving process module of the node where scheduler module 21 according to the message carrier address fed back to, The message deposit carrier of the message write-in distribution received from physical link, then the link reception of the node where scheduler module 21 Scheduler module is transmitted to process 21 after message carrier address being passed to the Communications Processor Module of the node where scheduler module 21;
(8) when scheduler module 11 receives the message that this node internal process 12 transmits, judge the first in, first out of scheduler module 11 Whether there is message carrier address in type FIFO receiving queues, if there being message carrier address, scheduler module 11 is from process mould Message carrier address is read in the first in, first out type FIFO receiving queues of block 11, according to the message carrier address from scheduler module 11 The Communications Processor Module of place node reads message;Otherwise, scheduler module 11 does not work, and wait for the arrival of news deposit scheduler module 11 In first in, first out type FIFO receiving queues, the message sink of transparent interprocess communication in node is completed;
(9) when the message that the scheduler module 12 in other nodes that scheduler module 21 receives in communication system is sent, judge Whether there is message carrier address in the first in, first out type FIFO receiving queues of scheduler module 21, if with having message carrier Location, scheduler module 21 read message carrier address from the first in, first out type FIFO receiving queues of scheduler module 11, are disappeared according to this It ceases bearer address and reads message from the Communications Processor Module of 21 place node of scheduler module;Otherwise, scheduler module 21 does not work, etc. In the first in, first out type FIFO receiving queues for waiting for message deposit scheduler module 21, the message of transparent interprocess communication between node is completed It receives.
3. a kind of transparent inter-process communication methods for supporting distributed system according to claim 2, it is characterised in that:Institute State in step (2), in a node, if process is scheduled based on priority, and a priority can only create one into Journey, then the ID number of process is made of node number+process priority.
4. a kind of transparent inter-process communication methods for supporting distributed system according to claim 2, it is characterised in that:Institute It states in step (4), in the distributed system of requirement of real-time, what is executed in node link receiving process module is to interrupt clothes Be engaged in program ISR, and the ID number of process is node number+interrupt number.
CN201510725014.4A 2015-10-30 2015-10-30 A kind of transparent interprocess communication system and method for supporting distributed system Active CN105426260B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510725014.4A CN105426260B (en) 2015-10-30 2015-10-30 A kind of transparent interprocess communication system and method for supporting distributed system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510725014.4A CN105426260B (en) 2015-10-30 2015-10-30 A kind of transparent interprocess communication system and method for supporting distributed system

Publications (2)

Publication Number Publication Date
CN105426260A CN105426260A (en) 2016-03-23
CN105426260B true CN105426260B (en) 2018-08-21

Family

ID=55504482

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510725014.4A Active CN105426260B (en) 2015-10-30 2015-10-30 A kind of transparent interprocess communication system and method for supporting distributed system

Country Status (1)

Country Link
CN (1) CN105426260B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106354573A (en) * 2016-08-29 2017-01-25 汉柏科技有限公司 Inter-process communication method and device based on priority queue
CN107038224B (en) * 2017-03-29 2022-09-30 腾讯科技(深圳)有限公司 Data processing method and data processing device
CN109002350B (en) * 2018-05-23 2021-08-03 中国石油天然气集团有限公司 Process communication method and device in cluster system
CN115336236B (en) * 2020-03-31 2024-04-02 阿里巴巴集团控股有限公司 Method implemented by a first computing node, first computing node and readable medium
CN114928660B (en) * 2022-05-16 2023-10-31 北京计算机技术及应用研究所 Method for communication between transparent processes of embedded operating system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1325217A (en) * 2000-08-29 2001-12-05 深圳市中兴通讯股份有限公司 Distributed communication system and method
CN101354695A (en) * 2008-09-19 2009-01-28 杭州华三通信技术有限公司 Method, system and distributed apparatus of communication between processes
CN101510901A (en) * 2009-02-19 2009-08-19 杭州华三通信技术有限公司 Communication method, communication apparatus and system between distributed equipment
CN101675424A (en) * 2007-05-04 2010-03-17 高通股份有限公司 Inter-process communication methods and apparatus for building scalable/redundant telecommunications systems

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080272188A1 (en) * 2007-05-02 2008-11-06 I4 Commerce Inc. Distributed system for commerce

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1325217A (en) * 2000-08-29 2001-12-05 深圳市中兴通讯股份有限公司 Distributed communication system and method
CN101675424A (en) * 2007-05-04 2010-03-17 高通股份有限公司 Inter-process communication methods and apparatus for building scalable/redundant telecommunications systems
CN101354695A (en) * 2008-09-19 2009-01-28 杭州华三通信技术有限公司 Method, system and distributed apparatus of communication between processes
CN101510901A (en) * 2009-02-19 2009-08-19 杭州华三通信技术有限公司 Communication method, communication apparatus and system between distributed equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"分布式信号通信系统的设计与实现";王云鹏;《中国优秀硕士学位论文全文数据库 信息科技辑》;20051015(第06期);全文 *

Also Published As

Publication number Publication date
CN105426260A (en) 2016-03-23

Similar Documents

Publication Publication Date Title
CN105426260B (en) A kind of transparent interprocess communication system and method for supporting distributed system
CN110347635B (en) Heterogeneous multi-core microprocessor based on multilayer bus
CN101354693B (en) Communication scheduling system and method among cores of isomerization multi-core processor
US11789895B2 (en) On-chip heterogeneous AI processor with distributed tasks queues allowing for parallel task execution
CN103365726B (en) A kind of method for managing resource towards GPU cluster and system
CN102970202B (en) 1553B bus communication method based on preemptive strategy
CN102521201A (en) Multi-core DSP (digital signal processor) system-on-chip and data transmission method
CN102480426B (en) Communication method based on peripheral component interconnect-express (PCIE) switching bus and PCIE switching system
CN109697122A (en) Task processing method, equipment and computer storage medium
CN110995598B (en) Variable-length message data processing method and scheduling device
CN102999377A (en) Service concurrent access control method and device
CN104503948B (en) The close coupling of multi-core network processing framework is supported adaptively to assist processing system
CN101739380B (en) Shared memory architecture-based multiprocessor communication device and method thereof
CN109144749A (en) A method of it is communicated between realizing multiprocessor using processor
CN102609307A (en) Multi-core multi-thread dual-operating system network equipment and control method thereof
CN108702339A (en) Technology in structure framework for being throttled based on service quality
CN102184157A (en) Information display device based on dual processor cooperation
CN106951390A (en) It is a kind of to reduce the NUMA system construction method of cross-node Memory accessing delay
CN103269317A (en) Lock-free communication method and system based on SMP system
CN114297130A (en) Data transmission processing method in chip system and related device
CN111653317B (en) Gene comparison acceleration device, method and system
WO2013177854A1 (en) Device and method for inter-core communication in multi-core processor
WO2021147877A1 (en) Data exchange system for statically distributed computing architecture, and method therefor
CN103347077A (en) Method and device for data transmission of distributed file system
CN102629217B (en) Network equipment with multi-process multi-operation system and control method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant