CN103150220A - Method and system for interprocess communications - Google Patents

Method and system for interprocess communications Download PDF

Info

Publication number
CN103150220A
CN103150220A CN2011104032991A CN201110403299A CN103150220A CN 103150220 A CN103150220 A CN 103150220A CN 2011104032991 A CN2011104032991 A CN 2011104032991A CN 201110403299 A CN201110403299 A CN 201110403299A CN 103150220 A CN103150220 A CN 103150220A
Authority
CN
China
Prior art keywords
packet
address
shared drive
preparehead
write
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.)
Granted
Application number
CN2011104032991A
Other languages
Chinese (zh)
Other versions
CN103150220B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201110403299.1A priority Critical patent/CN103150220B/en
Publication of CN103150220A publication Critical patent/CN103150220A/en
Application granted granted Critical
Publication of CN103150220B publication Critical patent/CN103150220B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method and a system for interprocess communications. The method comprises the following steps of receiving and sending data by a shared memory queue in the interprocess, and marking a Prepare Head address, an Actual Head address, a Prepare Tail address and an Actual Tail address in a shared memory; and meanwhile, respectively setting a handle pool in the sending process and the receiving process for temporarily storing each read address, enabling the sending process and the receiving process to directly read the shared memory, and coordinating the receiving speed and the sending speed of a data packet, so as to realize an effect of integrating the traditional buffer and the traditional shared memory. The method and the system have the advantages that the expenses of the calculating resources, such as a CPU (central processing unit) and the memory, are reduced, and the throughput of the interprocess communications is improved.

Description

Communication means between process and communication system
Technical field
The present invention relates to the data processing technique of computing machine, relate in particular to communication means and communication system between process.
Background technology
Interprocess communication (IPC, Interprocess Communications) be exactly to propagate or exchange message between different processes, this just needs to have the medium that both sides can access between different processes, and shared drive is exactly for the medium that communicates between process.So-called shared drive refers to that the same physical memory is mapped to process A, the B process address space separately, can be accessed simultaneously by A, B process, reaches the purpose of swap data.
Fig. 1 is the schematic diagram of the IPC method based on shared drive of the prior art.Referring to Fig. 1, existing IPC scheme based on shared drive can be at the inner buffer memory that uses of process, in this mechanism, the application thread that sends process A can first copy packet to internal buffer when sending data in, then by send-thread internally buffer zone copy on shared drive; Receiving process first copies data to internal buffer from shared drive by receiving thread, then returns to the application thread on upper strata.This shows, data need to be carried out twice data allocations, copy, releasing operation between shared drive and internal buffer in transmitting procedure, the computational resource expense (as CPU and memory cost) that these operations bring is very large, and the communication throughput between process is also lower.
Summary of the invention
In view of this, fundamental purpose of the present invention is to provide communication means and the communication system between a kind of process, to reduce the computational resource expense, promotes the handling capacity of interprocess communication.
Technical scheme of the present invention is achieved in that
Communication means between a kind of process, the method use shared drive formation transceiving data between process, comprising:
Mark read/write address in described shared drive, comprise preread head address PrepareHead, read head address ActualHead, prewrite tail address PrepareTail and write tail address ActualTail;
The transmission process is when sending data, send out data packet length according to current read/write address and wish and judge whether described shared drive has the space that can write this packet, when being determined with the space that can write this packet in shared drive take described PrepareTail as beginning data writing bag, and upgrade described PrepareTail according to the length of transmission packet, the writing address of this packet is put into the handle pond of transmission process when writing after complete; Send-thread reads the writing address in this handle pond successively, often read a writing address the data packet length corresponding according to this writing address upgrade described ActualTail, and notice receiving process receive data;
After receiving process is received the notice of receive data, judge according to described PrepareHead and ActualTail whether described shared drive has packet readable, described PrepareHead is put into the handle pond of receiving process when being determined with packet when readable, and upgrade this PrepareHead according to the data packet length that this PrepareHead begins; Receiving process reads the PrepareHead in this handle pond successively, and from this PrepareHead beginning read data packet of shared drive, often read a complete packet according to this read data packet length upgrade described ActualHead.
Communication system between a kind of process comprises:
Shared drive, be used for the communication data between formation form storage process, wherein be provided with the mark of shared drive read/write address, comprise preread head address PrepareHead, read head address ActualHead, prewrite tail address PrepareTail and write tail address ActualTail;
be arranged on the pre-sending module in the transmission process, send and use thread, sending module, send handle pond and send-thread, wherein: described pre-sending module is used for using thread when sending data when sending, judge according to described PrepareTail and ActualHead whether described shared drive has the space that can write wish transmission packet, when be determined with can write notify when wish sends the space of packet described transmission use thread in shared drive take described PrepareTail as beginning data writing bag, and upgrade described PrepareTail according to the length of this packet, described transmission is used thread and triggers described sending module after often being write a complete packet, and described sending module is for the writing address of transmission packet being put into described transmission handle pond, described send-thread is used for reading successively the writing address in this transmissions handle pond, often read a writing address the data packet length corresponding according to this writing address upgrade described ActualTail, and notify the receiving process receive data,
Be arranged on pre-receiving module in receiving process, receiving thread, reception handle pond, receive and use thread and receiver module; Wherein: described receiving process wakes receiving thread up after receiving the notice of receive data, receiving thread utilizes described pre-receiving module to judge according to described PrepareHead and ActualTail whether described shared drive has packet readable, described PrepareHead is put into when readable described reception handle pond when being determined with packet, and the data packet length that is begun according to this PrepareHead by described pre-receiving module upgrades this PrepareHead; Described reception is used thread and is read successively PrepareHead in this reception handle pond, and from this PrepareHead beginning read data packet of shared drive, often read a complete packet and trigger that receiver module upgrades described ActualHead according to this data packet length.
Compared with prior art, of the present invention based on shared drive IPC scheme, do not adopt caching technology, but in shared drive the mark read/write address, and the handle pond is set respectively in transmission process and receiving process, and be used for temporary each read/write address, make transmission process and the receiving process can the direct read/write shared drive, the reception of coordination data bag and transmission speed, thus reached on the whole the effect that traditional buffer memory and traditional shared drive are combined.Therefore, the present invention has reduced caching mechanism, twice data allocations, copy, releasing operation that data need to be carried out in transmitting procedure have been reduced between shared drive and internal buffer, thereby reduced the computational resource expense, as CPU and memory cost, and can promote the handling capacity of interprocess communication.
Description of drawings
Fig. 1 is the schematic diagram of the IPC method based on shared drive of the prior art;
Fig. 2 is a kind of composition schematic diagram of the communication system between process of the present invention;
Fig. 3 is a kind of schematic diagram of the storage organization of shared drive of the present invention.
Embodiment
The present invention is further described in more detail below in conjunction with drawings and the specific embodiments.
Fig. 2 is a kind of composition schematic diagram of the communication system between process of the present invention.Referring to Fig. 2, this interprocess communication system comprises:
Shared drive 200, be used for the communication data between formation form storage process, wherein be provided with the mark of shared drive read/write address, comprise preread head address (PrepareHead), read head address (ActualHead), prewrite tail address (PrepareTail) and write tail address (ActualTail), and the handle pond is set respectively in transmission process and receiving process.
described interprocess communication system also comprises the pre-sending module (PrepareSendPacket) 211 that is arranged in the transmission process, send and use thread 212, sending module (SendPacket) 213, send handle pond (handle buffer) 214 and send-thread 215, wherein: described pre-sending module 211 is used for using thread 212 when sending data when sending, judge according to the described PrepareTail in shared drive 200 and ActualHead whether this shared drive 200 has the space that can write wish transmission packet, when be determined with can write notify when wish sends the space of packet described transmission use thread 212 in shared drive 200 take described PrepareTail as beginning data writing bag, and upgrade described PrepareTail according to the length of this packet, described transmission is used thread 212 and triggers described sending module 213 after often being write a complete packet, and described sending module 213 is for the writing address of transmission packet being put into described transmission handle pond 214, described send-thread 215 is used for reading successively the writing address in this transmission handle pond 214, often read a writing address the data packet length corresponding according to this writing address upgrade described ActualTail in shared drive 200 and notice receiving process receive data.
Described interprocess communication system also comprises the pre-receiving module (PrepareRecvPacket) 221, the receiving thread 222 that are arranged in receiving process, receive handle pond 223, receive and use thread 224 and receiver module (RecvPacket) 225; Wherein: described receiving process wakes receiving thread 222 up after receiving the notice of receive data, receiving thread 222 triggers described pre-receiving module 221 and judges according to the PrepareHead in described shared drive 200 and ActualTail whether this shared drive 200 has packet readable, described PrepareHead is put into when readable described reception handle pond 223 when being determined with packet, and the data packet length that is begun according to this PrepareHead by described pre-receiving module 221 upgrades this PrepareHead; Described reception is used thread 224 and is read successively PrepareHead in this reception handle pond 223, and from this PrepareHead beginning read data packet of shared drive 200, often read a complete packet and trigger receiver module 225 and upgrade described ActualHead in shared drive according to this data packet length.
For convenient management, the minimum operation granularity in shared drive of the present invention is packet (Packet), and member variable TotalLength wherein is used for the length of sign notebook data bag; Also having member variable is read-write state mark (PacketState), be used for the one of four states that sign notebook data bag may exist: PREPARESEND (prewriting), SENDED (writing), PREPARERECV (reading in advance), RECVED (reading).
Fig. 3 is a kind of schematic diagram of the storage organization of shared drive of the present invention.referring to Fig. 3, in this kind embodiment, the size of described shared drive was fixed within the whole lifetime, in order can repeatedly to be read and write, described shared drive also is designed to round-robin queue in this embodiment, and locate to have safeguarded 5 marks at the head (Head) of shared drive, except above-mentioned PrepareHead, ActualHead, PrepareTail, and ActualTail, also further safeguarded the address mark of turning back (ReversalPosition), these 5 marks are equivalent to 5 handles, be used for the access of synchronized transmission end and receiving end, transmitting terminal upgrades PrepareTail when calling described PrepareSendPacket operation, upgrade ActualTail when calling the SendPacket operation, upgrade PrepareHead when receiving end calls PrepareRecvPacket, upgrade ActualHead when calling RecvPacket.
Described renewal refers to namely move along the formation direction of shared drive the length of the packet of sending out, and the start address from shared drive is upgraded again when needs are turned back.Take mobile PrepareTail as example, described concrete renewal is operating as: according to the value of the length adjustment PrepareTail of packet, if the data packet length that sends is 100 the value of PrepareTail is increased by 100.Described ReversalPosition is the position of turning back of round-robin queue, if the value after PrepareTail increases has surpassed the max cap. of shared drive has increased by 100 since 0, and the value of the PrepareTail of the value of ReversalPosition before being set to PrepareTail and moving.For example suppose that PrepareTail value before mobile is 950, the max cap. of shared drive is assumed to be 1000, the long data packet 100 that wish sends, 950 add 100 max capies 1000 that surpassed shared drive, need to turn back, the PrepareTail after turning back adds 100 since 0, and if the PrepareTail after turning back less than AcutalHead, the value of upgrading PrepareTail was 100 (namely adding 100 since 0), and the value of described ReversalPosition is updated to 950.
The operation of Prepare SendPacket of the present invention, two modules of PrepareRecvPacket is used for replacing original in piling the behavior of upper storage allocation, reaches the effect that traditional buffer memory and traditional shared drive are combined.
The below is received as example with the Packet Generation between the described transmission process of Fig. 2 and receiving process the communication means between process of the present invention is described.
The transmission process is when sending data, send out data packet length according to current read/write address and wish and judge whether described shared drive has the space that can write this packet, when being determined with the space that can write this packet in shared drive take described PrepareTail as beginning data writing bag, and upgrade described PrepareTail according to the length of transmission packet, the writing address of this packet is put into the handle pond (handle buffer) of transmission process when writing after complete; Send-thread reads the writing address in this handle pond successively, often read a writing address the data packet length corresponding according to this writing address upgrade described ActualTail, and notice receiving process receive data.
During specific implementation, the transmission process comprises pre-transmit operation (PrepareSendPacket), write operation (transmit operation) and transmit operation (SendPacket) when sending data.
Wherein, the specific operation process of pre-transmit operation process comprises the steps 311 to step 315:
Whether the thread monitoring is used in the transmission of step 311, transmission process has new packet wish to send, if having new packet to send call described PrepareSendPacket execution in step 312.
Step 312, obtain current wish and send packet at the writing address of shared drive by calling PrepareSendPacket, namely read the value of the PrepareTail mark of shared drive head, this value is exactly that this packet is at the writing address of shared drive, and read the value of the ActualHead mark of shared drive head, and obtain the length (totallength) that current wish sends packet.
Step 313, be the shared drive of round-robin queue owing to using in the present embodiment, therefore need the process judgement of turning back.Namely read ReversalPosition from the shared drive head, and judgement: whether ActualHead is less than or equal to PrepareTail and PrepareTail+totallength>ReversalPosition,, if it is need the processing of turning back, execution in step 315; Otherwise do not need the processing of turning back, execution in step 314.
Step 314, judge that whether PrepareTail+totallength is less than ActualHead, judge that if it is described shared drive can write the packet that current wish sends, using the thread home position to the transmission on upper strata is the memory address of PrepareTail, and upgrade PrepareTail according to formula PrepareTail=PrepareTail+totallength, the PacketState that this packet can be set simultaneously is PREPARESEND (prewriting state), returns to afterwards step 311; Otherwise judge that the shared drive formation is full, do not have to write the space that current wish sends packet, this moment, PrepareSendPacket returned to null value to the transmission application thread on upper strata, and this null value represents that the shared drive formation is full.
step 315, the leading address (being 0 in the present embodiment) that judges the shared drive formation adds that whether totallength is less than ActualHead, judge that if it is described shared drive can write the packet that current wish sends, first upgrade ReversalPosition according to formula ReversalPosition=PrepareTail this moment, upgrade PrepareTail according to formula PrepareTail=0+totallength again, memory address to upper layer application home position 0, the PacketState that this packet is set is PREPARESEND (prewriting), return to step 311, otherwise judge the full packet that namely can not write current wish transmission of shared drive formation, this moment, PrepareSendPacket returned to null value to upper layer application, and this null value represents that the shared drive formation is full.
The said write process is used thread execution by the transmission on upper strata, if the rreturn value of the PrepareSendPacket that the transmission on upper strata application thread is received is memory address, at this memory address data writing bag, if what receive is null value, illustrate that the shared drive formation is full, the transmission on upper strata is used thread and is processed according to the inherent logic needs, and self applied logic of concrete processing procedure and upper layer application is relevant, and the present invention does not limit.
The specific operation process of transmit operation comprises the steps 321 to step 323:
The transmission on step 321, upper strata is used thread in shared drive after the data writing bag, calls the SendPacket writing address that this packet is corresponding and puts into one as handle and send the handle pond, activates send-thread.
Step 322, described send-thread judge in the handle pond whether handle (each handle is exactly a writing address of shared drive) is arranged, and if it is execution in step 323, otherwise wait for the activation manipulation next time of SendPacket.
Step 323, read a handle the earliest in the handle pond, obtain the length totallength of the packet (namely being the packet of beginning take the shared drive address of this handle sign) at this handle place, and the PacketState that this packet is set is SENDED (writing).Read after this handle from described handle pond this handle is removed, in order to avoid repeat to read.
Step 323, read the ActualTail of described shared drive, upgrade ActualTail according to formula ActualTail=ActualTail+totallength (data packet length that step 323 is obtained), notice receiving process receive data, if the ActualTail after upgrading equals ReversalPosition ActualTail is reset to 0, return to step 321.
Receiving process wakes (receiving thread) up after receiving the receive data notice of transmission process, wake the rear processing that begins to carry out receive data up, mainly comprise pre-receiving operation (PrepareRecvPacket), read operation (namely receiving operation) and received operation (RecvPacket).
Wherein, the detailed process of pre-receiving operation comprises the steps 331 to step 334:
Step 331, receiving thread judge whether the described PrepareHead of shared drive equals ActualTail, if it is judge (namely receivable) packet that not can read in the formation of shared drive, do not operate this moment, otherwise be determined with the packet that can read, execution in step 332.
Step 332, receiving thread are judged to be with the value of PrepareHead the reading address that current wish receive data wraps in shared drive; The reading address that obtains as a handle, is put into the handle pond (handle buffer) of receiving process.
Step 333, determine in shared drive the length totallength from the initial packet of PrepareHead, upgrade PrepareHead according to formula PrepareHead=PrepareHead+totallength, and the PacketState that this packet is set is PREPARERECV (reading in advance), if the PrepareHead after upgrading equals ReversalPosition PrepareHead is reset to 0, return to step 331.
Read operation and the detailed process that has received operation (RecvPacket) comprise the steps 341 to step 343:
Step 341, upper strata receive to be used thread and judge in the handle pond of receiving process whether handle (each handle is exactly a reading address of shared drive) is arranged, and if it is execution in step 342, continue to judge otherwise repeat this step.
Step 342, upper strata receive to be used thread and reads a handle the earliest in the handle pond, reads corresponding packet from the reading address of the shared drive of this handle sign.Read after this handle from the handle pond this handle is removed, in order to avoid repeat to read.
Step 343, RecvPacket determine the length totallength when the packet that reads, upgrade ActualHead according to formula ActualHead=ActualHead+totallength, the PacketState that this packet is set is RECVED (reading), if the ActualHead after upgrading equals ReversalPosition with the leading address (being 0 in this embodiment) that ActualHead resets to described shared drive, returns to step 341.
Compare with traditional IPC scheme of passing through buffer memory, the present invention deteriorates to the handle pond by the buffer memory with this locality, no matter each how many data that send, all only has the redundancy overhead of 2 handles.A handle takies 4 bytes as example on 32 machines, only need the redundancy overhead of 8 bytes, and traditional IPC scheme needs complete copy monoblock data twice, thereby has greatly promoted communication throughput.
Simultaneously, whether the round-robin queue that PrepareSendPacket of the present invention operation can also be sent out shared drive early full problem (may occur during greater than inbound pacing when transmission speed), and process immediately, and traditional IPC scheme does not have good solution in round-robin queue completely the time, retransmits or packet loss all possibly can't satisfy the upper layer application demand.
In addition, the scope that the action need in the present invention locks only limits to described 5 marks of shared drive head, with concrete data independence, has reduced the expense that locks, and has reduced the possibility of lock competition.
The above is only preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of making, is equal to replacement, improvement etc., within all should being included in the scope of protection of the invention.
The above is only preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of making, is equal to replacement, improvement etc., within all should being included in the scope of protection of the invention.

Claims (8)

1. the communication means between a process, the method is used shared drive formation transceiving data between process, it is characterized in that, comprising:
Mark read/write address in described shared drive, comprise preread head address PrepareHead, read head address ActualHead, prewrite tail address PrepareTail and write tail address ActualTail;
The transmission process is when sending data, send out data packet length according to current read/write address and wish and judge whether described shared drive has the space that can write this packet, when being determined with the space that can write this packet in shared drive take described PrepareTail as beginning data writing bag, and upgrade described PrepareTail according to the length of transmission packet, the writing address of this packet is put into the handle pond of transmission process when writing after complete; Send-thread reads the writing address in this handle pond successively, often read a writing address the data packet length corresponding according to this writing address upgrade described ActualTail, and notice receiving process receive data;
After receiving process is received the notice of receive data, judge according to described PrepareHead and ActualTail whether described shared drive has packet readable, described PrepareHead is put into the handle pond of receiving process when being determined with packet when readable, and upgrade this PrepareHead according to the data packet length that this PrepareHead begins; Receiving process reads the PrepareHead in this handle pond successively, and from this PrepareHead beginning read data packet of shared drive, often read a complete packet according to this read data packet length upgrade described ActualHead.
2. method according to claim 1, is characterized in that, describedly sends out data packet length according to current read/write address and wish and judge whether described shared drive has the concrete grammar in the space that can write this packet to be:
Whether judge length totallength that PrepareTail adds current data packet less than ActualHead, if it is described shared drive has the space that can write this packet, otherwise there is no to write the space of this packet.
3. method according to claim 1, is characterized in that, describedly judges according to described PrepareHead and ActualTail whether described shared drive has the readable concrete mode of packet to be:
Judge whether described PrepareHead and ActualTail equate, if it is judging does not have packet readable, otherwise it is readable to be determined with packet.
4. method according to claim 1, is characterized in that, the concrete mode that described length according to the transmission packet is upgraded described PrepareTail by: with the increase of PrepareTail value the length of transmission packet;
The concrete mode that the described data packet length corresponding according to the said write address upgrades described ActualTail is: the length that the value of ActualTail is increased packet corresponding to institute's writing address;
The concrete mode that the described data packet length that begins according to described PrepareHead upgrades this PrepareHead is: the length that the value of PrepareHead is increased the packet that this PrepareHead begins;
The described basis concrete mode of the described ActualHead of read data packet length renewal is: the value of ActualHead is increased this length of read data bag.
5. method according to claim 1, is characterized in that, the formation of described shared drive is round-robin queue, and in described shared drive the mark address of turning back; And judged in the transmission process whether described shared drive has and further comprised before can writing the space that wish sends packet:
Whether judge ActualHead less than or equal to PrepareTail, and PrepareTail adds that length that current wish sends packet whether greater than the authorize address of turning back, if so, needs to turn back, otherwise, do not need to turn back;
When needs are turned back, whether the length that adds wish transmission packet by the leading address that judges the shared drive formation judges less than ActualHead whether shared drive has the space that can write wish transmission packet, if it is be determined with and write the space that wish sends packet, otherwise there is no to write the space of this packet; Be determined with can write the space that wish sends packet after, upgrade described PrepareTail before, further comprise the described address of turning back is updated to current PrepareTail, upgrade afterwards described PrepareTail, concrete update mode is again: the leading address that this PrepareTail is updated to the shared drive formation adds that wish sends the length of packet; And the leading address take the shared drive formation writes the packet of wish transmission as beginning;
Further comprise respectively after upgrading respectively described ActualTail, PrepareHead and ActualHead: whether the value after judgement is upgraded equals the described address of turning back, and the value after if it is upgrading resets to the leading address of described shared drive.
6. method according to claim 1, is characterized in that, the method further comprises:
The read-write state mark is set in described packet;
When take described PrepareTail as beginning data writing bag, the read-write state mark in this packet is set to prewrite state;
The read-write state mark of often reading the writing address packet that writing address is corresponding when send-thread from described handle pond is set to write state;
The read-write state mark of the packet that this PrepareHead begins when described receiving process is put into described handle pond with described PrepareHead is set to pre-read states;
The read-write state mark of this packet is set to reading state when reading a complete packet.
7. the communication system between a process, is characterized in that, comprising:
Shared drive, be used for the communication data between formation form storage process, wherein be provided with the mark of shared drive read/write address, comprise preread head address PrepareHead, read head address ActualHead, prewrite tail address PrepareTail and write tail address ActualTail;
be arranged on the pre-sending module in the transmission process, send and use thread, sending module, send handle pond and send-thread, wherein: described pre-sending module is used for using thread when sending data when sending, judge according to described PrepareTail and ActualHead whether described shared drive has the space that can write wish transmission packet, when be determined with can write notify when wish sends the space of packet described transmission use thread in shared drive take described PrepareTail as beginning data writing bag, and upgrade described PrepareTail according to the length of this packet, described transmission is used thread and triggers described sending module after often being write a complete packet, and described sending module is for the writing address of transmission packet being put into described transmission handle pond, described send-thread is used for reading successively the writing address in this transmissions handle pond, often read a writing address the data packet length corresponding according to this writing address upgrade described ActualTail, and notify the receiving process receive data,
Be arranged on pre-receiving module in receiving process, receiving thread, reception handle pond, receive and use thread and receiver module; Wherein: described receiving process wakes receiving thread up after receiving the notice of receive data, receiving thread utilizes described pre-receiving module to judge according to described PrepareHead and ActualTail whether described shared drive has packet readable, described PrepareHead is put into when readable described reception handle pond when being determined with packet, and the data packet length that is begun according to this PrepareHead by described pre-receiving module upgrades this PrepareHead; Described reception is used thread and is read successively PrepareHead in this reception handle pond, and from this PrepareHead beginning read data packet of shared drive, often read a complete packet and trigger that receiver module upgrades described ActualHead according to this data packet length.
8. communication system according to claim 7, is characterized in that, the formation of described shared drive is round-robin queue, and be marked with the address of turning back in described shared drive.
CN201110403299.1A 2011-12-07 2011-12-07 Communication means between process and communication system Active CN103150220B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110403299.1A CN103150220B (en) 2011-12-07 2011-12-07 Communication means between process and communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110403299.1A CN103150220B (en) 2011-12-07 2011-12-07 Communication means between process and communication system

Publications (2)

Publication Number Publication Date
CN103150220A true CN103150220A (en) 2013-06-12
CN103150220B CN103150220B (en) 2016-08-31

Family

ID=48548318

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110403299.1A Active CN103150220B (en) 2011-12-07 2011-12-07 Communication means between process and communication system

Country Status (1)

Country Link
CN (1) CN103150220B (en)

Cited By (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103441831A (en) * 2013-08-22 2013-12-11 焦点科技股份有限公司 Full-duplex communication between double courses, and mutual protection method and system between double courses
CN103514053A (en) * 2013-09-22 2014-01-15 中国科学院信息工程研究所 Shared-memory-based method for conducting communication among multiple processes
CN103593247A (en) * 2013-11-18 2014-02-19 腾讯科技(成都)有限公司 Method and device for data transmission
CN103645863A (en) * 2013-12-12 2014-03-19 北京奇虎科技有限公司 Data reading and writing-in methods and systems of shared memory
CN104468417A (en) * 2014-12-16 2015-03-25 上海斐讯数据通信技术有限公司 Stacking switch message transmission method and system and stacking switch
CN105159786A (en) * 2015-07-03 2015-12-16 北京奇虎科技有限公司 Method and device for inter-process communication
CN105183366A (en) * 2015-07-08 2015-12-23 北京师范大学 Data analysis processing method and system based on pre-read and post-write
CN105426261A (en) * 2015-11-11 2016-03-23 东莞福泽尔电子科技有限公司 Cross-platform real-time memory communication system method
CN105700962A (en) * 2014-11-26 2016-06-22 中兴通讯股份有限公司 Data update processing method and apparatus
CN103645942B (en) * 2013-12-12 2017-02-01 北京奇安信科技有限公司 Message queue based write and read method and system of shared memory
CN106610892A (en) * 2015-10-23 2017-05-03 腾讯科技(深圳)有限公司 Memory leak detecting method and device
CN108989392A (en) * 2018-06-21 2018-12-11 聚好看科技股份有限公司 A kind of server data caching method, device and server
CN109101456A (en) * 2018-08-30 2018-12-28 浪潮电子信息产业股份有限公司 Data interactive communication method and device in simulation SSD and terminal
CN109117340A (en) * 2018-06-29 2019-01-01 Oppo(重庆)智能科技有限公司 A kind of mobile terminal and its monitoring method, the storage medium of interprocess communication
CN110456656A (en) * 2019-07-08 2019-11-15 许继电气股份有限公司 EMTDC simulator, EMTDC analogue system and its emulation mode
CN110990169A (en) * 2019-11-29 2020-04-10 深圳市风云实业有限公司 Structure and method for inter-process byte stream communication by using shared memory
CN111158927A (en) * 2019-12-17 2020-05-15 科大讯飞股份有限公司 Inter-process communication method, device and storage medium
CN111367625A (en) * 2018-12-26 2020-07-03 阿里巴巴集团控股有限公司 Thread awakening method and device, storage medium and electronic equipment
CN111796948A (en) * 2020-07-02 2020-10-20 长视科技股份有限公司 Shared memory access method and device, computer equipment and storage medium
US10884830B1 (en) 2019-07-16 2021-01-05 Advanced New Technologies Co., Ltd. Method and apparatus for multithreaded data transmission in a tee system
WO2021008110A1 (en) * 2019-07-16 2021-01-21 创新先进技术有限公司 Multi-thread data transmission method and apparatus in tee system
WO2021008105A1 (en) * 2019-07-16 2021-01-21 创新先进技术有限公司 Data transmission method and device in tee system
WO2021008104A1 (en) * 2019-07-16 2021-01-21 创新先进技术有限公司 Data transmission methods and devices in tee system
CN112559196A (en) * 2019-09-10 2021-03-26 航天科工惯性技术有限公司 Transmission method for interprocess communication data sharing
US11003785B2 (en) 2019-07-16 2021-05-11 Advanced New Technologies Co., Ltd. Data transmission method and apparatus in tee systems
US11042642B2 (en) 2019-07-16 2021-06-22 Advanced New Technologies Co., Ltd. Method and apparatus for data transmission in a TEE system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5787300A (en) * 1993-11-10 1998-07-28 Oracle Corporation Method and apparatus for interprocess communications in a database environment
KR20020091584A (en) * 2001-05-31 2002-12-06 주식회사 하이닉스반도체 Method for processing ipc between processor using asynchronous shared memory
CN101763289A (en) * 2009-09-25 2010-06-30 中国人民解放军国防科学技术大学 Message passing method based on shared memory

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5787300A (en) * 1993-11-10 1998-07-28 Oracle Corporation Method and apparatus for interprocess communications in a database environment
KR20020091584A (en) * 2001-05-31 2002-12-06 주식회사 하이닉스반도체 Method for processing ipc between processor using asynchronous shared memory
CN101763289A (en) * 2009-09-25 2010-06-30 中国人民解放军国防科学技术大学 Message passing method based on shared memory

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
刘晓建等: "一种用于并行***的非阻塞消息队列机制", 《计算机工程与科学》 *
张敦行等: "基于多空间内存共享的高速网络链路数据包捕获方法", 《计算机应用研究》 *
王振宇等: "基于Netfilter的DNS实时监控统计***的设计", 《计算机应用研究》 *
蒋志文: "基于RTX的建模与实施仿真软件YH-RTSIM的设计", 《计算机应用》 *

Cited By (46)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103441831B (en) * 2013-08-22 2016-12-28 焦点科技股份有限公司 Full-duplex communication between a kind of two process and protect method and system mutually
CN103441831A (en) * 2013-08-22 2013-12-11 焦点科技股份有限公司 Full-duplex communication between double courses, and mutual protection method and system between double courses
CN103514053A (en) * 2013-09-22 2014-01-15 中国科学院信息工程研究所 Shared-memory-based method for conducting communication among multiple processes
CN103514053B (en) * 2013-09-22 2017-01-25 中国科学院信息工程研究所 Shared-memory-based method for conducting communication among multiple processes
CN103593247A (en) * 2013-11-18 2014-02-19 腾讯科技(成都)有限公司 Method and device for data transmission
CN103645863A (en) * 2013-12-12 2014-03-19 北京奇虎科技有限公司 Data reading and writing-in methods and systems of shared memory
CN103645863B (en) * 2013-12-12 2017-12-08 北京奇安信科技有限公司 Method for reading data and system, the wiring method and system of shared drive
CN103645942B (en) * 2013-12-12 2017-02-01 北京奇安信科技有限公司 Message queue based write and read method and system of shared memory
CN105700962A (en) * 2014-11-26 2016-06-22 中兴通讯股份有限公司 Data update processing method and apparatus
CN104468417B (en) * 2014-12-16 2018-05-01 上海斐讯数据通信技术有限公司 A kind of stacked switch message transmitting method, system and stacked switch
CN104468417A (en) * 2014-12-16 2015-03-25 上海斐讯数据通信技术有限公司 Stacking switch message transmission method and system and stacking switch
CN105159786A (en) * 2015-07-03 2015-12-16 北京奇虎科技有限公司 Method and device for inter-process communication
CN105159786B (en) * 2015-07-03 2018-10-30 北京奇虎科技有限公司 A kind of method and apparatus of interprocess communication
CN105183366A (en) * 2015-07-08 2015-12-23 北京师范大学 Data analysis processing method and system based on pre-read and post-write
CN105183366B (en) * 2015-07-08 2018-04-17 北京师范大学 Delay the data analysis processing method write and system based on pre-reading
CN106610892A (en) * 2015-10-23 2017-05-03 腾讯科技(深圳)有限公司 Memory leak detecting method and device
CN105426261A (en) * 2015-11-11 2016-03-23 东莞福泽尔电子科技有限公司 Cross-platform real-time memory communication system method
CN105426261B (en) * 2015-11-11 2019-04-30 东莞福泽尔电子科技有限公司 A kind of cross-platform real-time communication system method
CN108989392A (en) * 2018-06-21 2018-12-11 聚好看科技股份有限公司 A kind of server data caching method, device and server
CN109117340B (en) * 2018-06-29 2022-03-29 Oppo(重庆)智能科技有限公司 Mobile terminal, method for monitoring interprocess communication of mobile terminal and storage medium
CN109117340A (en) * 2018-06-29 2019-01-01 Oppo(重庆)智能科技有限公司 A kind of mobile terminal and its monitoring method, the storage medium of interprocess communication
CN109101456A (en) * 2018-08-30 2018-12-28 浪潮电子信息产业股份有限公司 Data interactive communication method and device in simulation SSD and terminal
CN109101456B (en) * 2018-08-30 2021-10-15 浪潮电子信息产业股份有限公司 Data interactive communication method and device in simulation SSD and terminal
CN111367625B (en) * 2018-12-26 2023-05-09 阿里巴巴集团控股有限公司 Thread awakening method and device, storage medium and electronic equipment
CN111367625A (en) * 2018-12-26 2020-07-03 阿里巴巴集团控股有限公司 Thread awakening method and device, storage medium and electronic equipment
CN110456656B (en) * 2019-07-08 2022-08-16 许继电气股份有限公司 EMTDC (electro-magnetic transient DC) simulation device, EMTDC simulation system and simulation method thereof
CN110456656A (en) * 2019-07-08 2019-11-15 许继电气股份有限公司 EMTDC simulator, EMTDC analogue system and its emulation mode
WO2021008104A1 (en) * 2019-07-16 2021-01-21 创新先进技术有限公司 Data transmission methods and devices in tee system
WO2021008110A1 (en) * 2019-07-16 2021-01-21 创新先进技术有限公司 Multi-thread data transmission method and apparatus in tee system
WO2021008105A1 (en) * 2019-07-16 2021-01-21 创新先进技术有限公司 Data transmission method and device in tee system
US10896075B1 (en) 2019-07-16 2021-01-19 Advanced New Technologies Co., Ltd. Method and apparatus for multithreaded data transmission in a TEE system
WO2021008111A1 (en) * 2019-07-16 2021-01-21 创新先进技术有限公司 Multi-thread data transmission method and device in tee system
US10943006B2 (en) 2019-07-16 2021-03-09 Advanced New Technologies Co., Ltd. Method and apparatus for multithreaded data transmission in a TEE system
US11250145B2 (en) 2019-07-16 2022-02-15 Advanced New Technologies Co., Ltd. Data transmission method and apparatus in tee systems
US11003785B2 (en) 2019-07-16 2021-05-11 Advanced New Technologies Co., Ltd. Data transmission method and apparatus in tee systems
TWI730630B (en) * 2019-07-16 2021-06-11 開曼群島商創新先進技術有限公司 Multi-thread data transmission method and device in TEE system
US11042642B2 (en) 2019-07-16 2021-06-22 Advanced New Technologies Co., Ltd. Method and apparatus for data transmission in a TEE system
US10884830B1 (en) 2019-07-16 2021-01-05 Advanced New Technologies Co., Ltd. Method and apparatus for multithreaded data transmission in a tee system
CN112559196A (en) * 2019-09-10 2021-03-26 航天科工惯性技术有限公司 Transmission method for interprocess communication data sharing
CN112559196B (en) * 2019-09-10 2024-03-26 航天科工惯性技术有限公司 Transmission method for sharing communication data between processes
CN110990169B (en) * 2019-11-29 2022-11-01 深圳市风云实业有限公司 Structure and method for inter-process byte stream communication by using shared memory
CN110990169A (en) * 2019-11-29 2020-04-10 深圳市风云实业有限公司 Structure and method for inter-process byte stream communication by using shared memory
CN111158927A (en) * 2019-12-17 2020-05-15 科大讯飞股份有限公司 Inter-process communication method, device and storage medium
CN111158927B (en) * 2019-12-17 2023-10-24 科大讯飞股份有限公司 Inter-process communication method, inter-process communication device and storage medium
CN111796948B (en) * 2020-07-02 2021-11-26 长视科技股份有限公司 Shared memory access method and device, computer equipment and storage medium
CN111796948A (en) * 2020-07-02 2020-10-20 长视科技股份有限公司 Shared memory access method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN103150220B (en) 2016-08-31

Similar Documents

Publication Publication Date Title
CN103150220A (en) Method and system for interprocess communications
US11449445B2 (en) Transaction-based hybrid memory
EP3920034A1 (en) Systems and methods for scalable and coherent memory devices
CN101409715B (en) Method and system for communication using InfiniBand network
CN103425225B (en) Application programmer in portable data device operating system and operation method thereof
JP5603507B2 (en) Accelerating cache state migration on directory-based multi-core architectures
CN101127685B (en) An inter-process communication device and inter-process communication method
CN104081366A (en) Apparatus and method to provide cache move with non-volatile mass memory system
CN108989432B (en) User-mode file sending method, user-mode file receiving method and user-mode file receiving and sending device
CN107870879A (en) A kind of data-moving method, accelerator board, main frame and data-moving system
CN101877666B (en) Method and device for receiving multi-application program message based on zero copy mode
US20110231599A1 (en) Storage apparatus and storage system
CN110046050B (en) Device and method for inter-core data transmission
CN103907095A (en) Mobile memory cache read optimization
CN113760185A (en) Memory block recovery method and device
CN103324599A (en) Inter-processor communication method and system on chip
CN109086168A (en) A kind of method and its system using hardware backup solid state hard disk writing rate
CN111651396B (en) Optimized PCIE (peripheral component interface express) complete packet out-of-order management circuit implementation method
US8832407B2 (en) Communication device with storage function
CN101415270A (en) Mobile terminal and communication method for processing module thereof
CN103442415A (en) Data sending method and mobile terminal
CN113986137A (en) Storage device and storage system
CN109257300A (en) A kind of storage method and device of network packet
US20150121376A1 (en) Managing data transfer
CN110445580B (en) Data transmission method and device, storage medium, and electronic device

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