CN104657224A - Inter-process communication method and device - Google Patents
Inter-process communication method and device Download PDFInfo
- Publication number
- CN104657224A CN104657224A CN201310594639.2A CN201310594639A CN104657224A CN 104657224 A CN104657224 A CN 104657224A CN 201310594639 A CN201310594639 A CN 201310594639A CN 104657224 A CN104657224 A CN 104657224A
- Authority
- CN
- China
- Prior art keywords
- receiving end
- message
- page table
- shared page
- shared
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 190
- 238000004891 communication Methods 0.000 title claims abstract description 178
- 238000013507 mapping Methods 0.000 claims abstract description 59
- 238000004886 process control Methods 0.000 claims description 58
- 238000012545 processing Methods 0.000 claims description 18
- 238000001514 detection method Methods 0.000 claims description 5
- 230000007306 turnover Effects 0.000 description 15
- 238000012369 In process control Methods 0.000 description 14
- 238000010965 in-process control Methods 0.000 description 10
- 230000005540 biological transmission Effects 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 9
- 230000000694 effects Effects 0.000 description 7
- 241001539077 Hyperoglyphe perciformis Species 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000012163 sequencing technique Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000001737 promoting effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Abstract
The embodiment of the invention provides an inter-process communication method and device, relates to the technical field of computers, and aims to realize reading of a message in the case that a receiving end does not need to enter or exit a kernel space, avoid the time expenditure for the receiving end to enter or exit the kernel space, save the response time of the message and meanwhile reduce the disturbance of cache of the receiving end. The method specifically comprises the following steps: establishing a communication channel between the transmitting end and the receiving end; entering the kernel space and writing a channel number and a first parameter of the communication channel into the kernel space; acquiring a shared page table of the receiving end according to the channel number of the communication channel; mapping the physical address of a memory page of the message to a continuous idle page table entry of the shared page table of the receiving end to obtain a new virtual address of the message; storing the new virtual address of the message and the first parameter in a message notification region of the receiving end so as to read the message by the receiving end according to the new virtual address. The method and the device are applied to inter-process communication.
Description
Technical field
The present invention relates to field of computer technology, particularly relate to a kind of method and apparatus of interprocess communication.
Background technology
Process is the program example that computing machine is running, and there is corresponding communication requirement between different process owing to mutually cooperating.In operating system research, interprocess communication (Interprocess Communication is called for short IPC) is an important research topic, and the efficiency improving IPC is particularly important to the performance of whole operating system.Conventional IPC method has transmission of messages, shared drive, zero-copy etc.Legacy operating system is divided into grand kernel and micro-kernel, in recent years, semiconductor fabrication process develop rapidly, the dominant frequency of uniprocessor chip approaches the limit gradually, depends merely on the dominant frequency promoting processor chips and the arithmetic speed of processor cannot have been made to continue constantly to promote along Moore's Law.Therefore people form on-chip multi-processor (Chip Multi-Processor is called for short CMP) system on a single die by integrated for multiple processor core.Current on-chip multi-processor system has become the main flow of present microprocessor development.CMP can be divided into again multinuclear (Multi-Core) and many core (Many-Core), usually the CMP of 8 below Core is called multinuclear, and the CMP of 8 more than Core is called many core.Along with the appearance of many core, the new operating system such as Barrelfish have been there is simultaneously.Barrelfish operating system is a micro-kernel (micro kernel) operating system, is also many kernels (multi-kernel) operating system, mainly towards multinuclear (Multi-core), many core (Many-core) platform simultaneously.
Of the prior art based in the kernel of Barrelfish operating system and interior internuclear zero-copy scheme, in order to message memory-mapped being entered the address space of oneself, receiving end needs to pass in and out kernel spacing, can cause corresponding time overhead like this; Meanwhile, receiving end turnover kernel spacing can cause the disturbance of receiving end high-speed cache.Zero-copy scheme in kernel in the L4 system of second generation micro-kernel system, owing to adopting synchronous IPC, makes underaction of programming; Meanwhile, receiving end still needs to pass in and out kernel spacing, and is only applicable to single core system.
Summary of the invention
Embodiments of the invention provide a kind of method and apparatus of interprocess communication, achieve receiving end in zero-copy scheme need not pass in and out kernel spacing and just can read message, avoid the time overhead of receiving end turnover kernel spacing, decrease the disturbance to receiving end high-speed cache simultaneously.
For achieving the above object, embodiments of the invention adopt following technical scheme:
First aspect, provides a kind of method of interprocess communication, comprising:
Transmitting terminal sets up the communication port with receiving end;
Kernel spacing is entered by system call, and by kernel spacing described in the channel number of described communication port and the first parameter read-in;
According to the channel number of described communication port, obtain the shared page table of described receiving end;
Wherein, described shared page table is for mapping the page table of the physical address of described message place memory pages in the page table that described page directory is corresponding;
By the physical address map of the described message place memory pages of acquisition in the continuous free page list item of the shared page table of described receiving end, obtain the new virtual address of message;
By the new virtual address of described message and described first parameter stored in the message informing district of described receiving end, so that described receiving end reads described message informing district obtain the new virtual address of described message and described first parameter, and read the described message with corresponding length according to described new virtual address;
Wherein, described message informing district distributes in described communication port process of establishing.
In the implementation that the first is possible, in conjunction with first aspect, described first parameter comprises: described ability is quoted, ability quotes skew, the length of described message page bias internal and described message, describedly enter kernel spacing by system call, and by before kernel spacing described in the channel number of described communication port and the first parameter read-in, also comprise:
Obtain and store ability corresponding to the internal memory of described message and quote and quote skew with ability.
In the implementation that the second is possible, in conjunction with first aspect, the described channel number according to described communication port, obtains the shared page table of described receiving end, comprising:
According to the channel number of described communication port, obtain the process control block (PCB) that described receiving end is corresponding;
According to the page directory address of the described receiving end in described process control block (PCB), obtain the first shared page table of described receiving end.
In the implementation that the third is possible, in conjunction with the implementation that the second is possible, the described channel number according to described communication port, obtains the process control block (PCB) that receiving end is corresponding, comprising:
According to the channel number of described communication port, obtain receiving end;
Relation mapping table between the process corresponding according to described receiving end and process control block (PCB), obtains the process control block (PCB) that described receiving end is corresponding;
Wherein, the relation mapping table between the process that described receiving end is corresponding and process control block (PCB) is stored in advance in kernel spacing.
In the 4th kind of possible implementation, in conjunction with first aspect or the first possible implementation, described by the physical address map of described message place memory pages that obtains in the continuous free page list item of the shared page table of described receiving end, obtain the new virtual address of message, comprising:
Check the page table entry of the shared page table of described receiving end, obtain the continuous free page list item that can hold described message;
By the physical address map of the described message place memory pages of acquisition in the continuous free page list item of described shared page table, obtain the new virtual address of message.
In the 5th kind of possible implementation, in conjunction with first aspect,
Described first parameter comprises: the virtual address of described message and the length of described message, and the physical address of described message place memory pages obtains according to the virtual address of described message and the length of described message.
In the 6th kind of possible implementation, in conjunction with first aspect or the 4th kind of possible implementation,
Described shared page table is the first shared page table;
Wherein, described first shared page table is the page table for carrying out list of physical addresses mapping, and the first shared page table of described transmitting terminal and the first shared page table of described receiving end share Same Physical memory pages or the different physical memory page in described kernel spacing.
In the 7th kind of possible implementation, in conjunction with first aspect or the 4th kind of possible implementation,
Described shared page table is the second shared page table;
Wherein, described second shared page table is the page table for carrying out list of physical addresses mapping, and the second shared page table of described transmitting terminal and the second shared page table of described receiving end share Same Physical memory pages in described kernel spacing.
In the 8th kind of possible implementation, in conjunction with first aspect or the first possible implementation, described method also comprises:
The space of a page size is obtained as shared page table from memory headroom;
Described shared page table is mapped into described transmitting terminal and described receiving end page directory in, or, described shared page table is mapped into described receiving end page directory in.
Second aspect, provides a kind of device of interprocess communication, comprising:
Creating unit, for setting up the communication port communicated with receiving end;
Processing unit, for entering kernel spacing by system call, and by kernel spacing described in the channel number of described communication port and the first parameter read-in;
Acquiring unit, for the channel number according to described communication port, obtains the shared page table of described receiving end;
Wherein, described shared page table is for mapping the page table of the physical address of described message place memory pages in the page table that described page directory is corresponding;
Described processing unit, also for the physical address map of described message place memory pages that will obtain in the continuous free page list item of the shared page table of described receiving end, obtain the new virtual address of message;
Storage unit, for by the new virtual address of described message and described first parameter stored in the message informing district of described receiving end, so that described receiving end reads described message informing district obtain the new virtual address of described message and described first parameter, and read the described message with corresponding length according to described new virtual address;
Wherein, described message informing district distributes in described communication port process of establishing.
In the implementation that the first is possible, in conjunction with second aspect, described first parameter comprises: ability is quoted, ability quotes skew, the length of described message page bias internal and described message,
Described acquiring unit, also quotes and quotes skew for obtaining ability corresponding to the internal memory that stores described message with ability.
In the implementation that the second is possible, in conjunction with second aspect, described acquiring unit comprises:
First acquisition module, for the channel number according to described communication port, obtains the process control block (PCB) that described receiving end is corresponding;
Second acquisition module, for the page directory address according to the described receiving end in described process control block (PCB), obtains the first shared page table of described receiving end.
In the implementation that the third is possible, in conjunction with the implementation that the first is possible, described first acquisition module specifically for:
According to the channel number of described communication port, obtain receiving end;
Relation mapping table between the process corresponding according to described receiving end and process control block (PCB), obtains the process control block (PCB) that described receiving end is corresponding;
Wherein, the relation mapping table between the process that described receiving end is corresponding and process control block (PCB) is stored in advance in kernel spacing.
In the 4th kind of possible implementation, in conjunction with second aspect or the first possible implementation, described processing unit comprises:
Detection module, for checking the page table entry of the shared page table of described receiving end, obtains the continuous free page list item that can hold described message;
3rd acquisition module, for the physical address map of described message place memory pages that will obtain in the continuous free page list item of described shared page table, obtains the new virtual address of message.
In the 5th kind of possible implementation, in conjunction with second aspect,
Described first parameter comprises: the virtual address of described message and the length of described message, and the physical address of described message place memory pages obtains according to the virtual address of described message and the length of described message.
In the 6th kind of possible implementation, in conjunction with second aspect or the 4th kind of possible implementation,
Described shared page table is the first shared page table;
Wherein, described first shared page table is the page table for carrying out list of physical addresses mapping, and the first shared page table of described transmitting terminal and the first shared page table of described receiving end share Same Physical memory pages or the different physical memory page in described kernel spacing.
In the 7th kind of possible implementation, in conjunction with second aspect or the 4th kind of possible implementation,
Described shared page table is the second shared page table;
Wherein, described second shared page table is the page table for carrying out list of physical addresses mapping, and the second shared page table of described transmitting terminal and the second shared page table of described receiving end share Same Physical memory pages in described kernel spacing.
In the 8th kind of possible implementation, in conjunction with second aspect or the first possible implementation,
Described acquiring unit, also for obtaining the space of a page size as shared page table from internal memory;
Described processing unit, also for described shared page table is mapped in the page directory of described transmitting terminal and described receiving end, or, described shared page table is mapped into described receiving end page directory in.
The third aspect, there is provided a kind of device of interprocess communication, comprising: at least one processor, storer, communication interface and bus, at least one processor described, storer and communication interface are connected by bus and complete mutual communication, described storer is used for program code stored, wherein:
Described processor, for calling the program code in storer, in order to perform following operation:
Transmitting terminal sets up the communication port with receiving end;
Kernel spacing is entered by system call, and by kernel spacing described in the channel number of described communication port and the first parameter read-in;
According to the channel number of described communication port, obtain the shared page table of described receiving end;
Wherein, described shared page table is for mapping the page table of the physical address of described message place memory pages in the page table that described page directory is corresponding;
By the physical address map of the described message place memory pages of acquisition in the continuous free page list item of the shared page table of described receiving end, obtain the new virtual address of message;
By the new virtual address of described message and described first parameter stored in the message informing district of described receiving end, so that described receiving end reads described message informing district obtain the new virtual address of described message and described first parameter, and read the described message with corresponding length according to described new virtual address;
Wherein, described message informing district distributes in described communication port process of establishing.
In the implementation that the first is possible, in conjunction with the third aspect, described first parameter comprises: described ability is quoted, ability quotes skew, the length of described message page bias internal and described message, and described processor is also for performing following operation:
Obtain and store ability corresponding to the internal memory of described message and quote and quote skew with ability.
In the implementation that the second is possible, in conjunction with the third aspect, described processor is specifically for performing following steps:
According to the channel number of described communication port, obtain the process control block (PCB) that described receiving end is corresponding;
According to the page directory address of the described receiving end in described process control block (PCB), obtain the first shared page table of described receiving end.
In the implementation that the third is possible, in conjunction with the implementation that the second is possible, described processor is specifically for performing following steps:
According to the channel number of described communication port, obtain receiving end;
Relation mapping table between the process corresponding according to described receiving end and process control block (PCB), obtains the process control block (PCB) that described receiving end is corresponding;
Wherein, the relation mapping table between the process that described receiving end is corresponding and process control block (PCB) is stored in advance in kernel spacing.
In the 4th kind of possible implementation, in conjunction with the third aspect or the first possible implementation, described processor is specifically for performing following steps:
Check the page table entry of the shared page table of described receiving end, obtain the continuous free page list item that can hold described message;
By the physical address map of the described message place memory pages of acquisition in the continuous free page list item of described shared page table, obtain the new virtual address of message.
In the 5th kind of possible implementation, in conjunction with the third aspect,
Described first parameter comprises: the virtual address of described message and the length of described message, and the physical address of described message place memory pages obtains according to the virtual address of described message and the length of described message.
In the 6th kind of possible implementation, in conjunction with the third aspect or the 4th kind of possible implementation,
Described shared page table is the first shared page table;
Wherein, described first shared page table is the page table for carrying out list of physical addresses mapping, and the first shared page table of described transmitting terminal and the first shared page table of described receiving end share Same Physical memory pages or the different physical memory page in described kernel spacing.
In the 7th kind of possible implementation, in conjunction with first aspect or the 4th kind of possible implementation,
Described shared page table is the second shared page table;
Wherein, described second shared page table is the page table for carrying out list of physical addresses mapping, and the second shared page table of described transmitting terminal and the second shared page table of described receiving end share Same Physical memory pages in described kernel spacing.
In the 8th kind of possible implementation, in conjunction with the third aspect or the first possible implementation, described processor is also for performing following steps:
The space of a page size is obtained as shared page table from memory headroom;
Described shared page table is mapped into described transmitting terminal and described receiving end page directory in, or, described shared page table is mapped into described receiving end page directory in.
The method and apparatus of the interprocess communication that embodiments of the invention provide, by transmitting terminal by the physical address map of message to obtain receiving end shared page table continuous free page list item page in, obtain the new virtual address of this message, and by new virtual address stored in the message informing district of receiving end, achieve receiving end in zero-copy scheme need not pass in and out kernel spacing and just can read message, avoid the time overhead of receiving end turnover kernel spacing, decrease the disturbance to receiving end high-speed cache simultaneously.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
The schematic flow sheet of the method for a kind of interprocess communication that Fig. 1 provides for embodiments of the invention;
The schematic flow sheet of the method for the another kind of interprocess communication that Fig. 2 provides for embodiments of the invention;
The schematic flow sheet of the method for another interprocess communication that Fig. 3 provides for embodiments of the invention;
The schematic flow sheet of the method for another interprocess communication that Fig. 4 provides for embodiments of the invention;
The schematic flow sheet of the method for a kind of interprocess communication that Fig. 5 provides for another embodiment of the present invention;
The schematic flow sheet of the method for the another kind of interprocess communication that Fig. 6 provides for another embodiment of the present invention;
The structural representation of the device of a kind of interprocess communication that Fig. 7 provides for embodiments of the invention;
The structural representation of the device of the another kind of interprocess communication that Fig. 8 provides for embodiments of the invention;
The structural representation of the device of another interprocess communication that Fig. 9 provides for embodiments of the invention;
The structural representation of the device of another interprocess communication that Figure 10 provides for embodiments of the invention;
The structural representation of the system of a kind of interprocess communication that Figure 11 provides for embodiments of the invention;
The structural representation of the system of the another kind of interprocess communication that Figure 12 provides for embodiments of the invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The method of the interprocess communication that embodiments of the invention provide, can be applied in the zero-copy scheme of interprocess communication, the scheme of the zero-copy of existing single kernel and many kernel operating system is mainly applied in the kernel of Barrefish system, interior internuclear zero-copy scheme, the scheme of the zero-copy of the L4 system in second generation micro-kernel system, this two schemes in realization receiving end process Py all needs to pass in and out kernel spacing, corresponding time overhead can be caused, cause the disturbance of receiving end high-speed cache, simultaneously underaction in use.Embodiments of the invention provide a kind of scheme of zero-copy, and this scheme receiving end need not pass in and out kernel spacing, just can realize the communication between transmitting terminal and receiving end, and this implementation process realizing the scheme of zero-copy is realized by software programming on backstage.
Embodiments of the invention provide a kind of method of interprocess communication, and with reference to shown in Fig. 1, the method comprises the following steps:
101, transmitting terminal sets up the communication port with receiving end.
Concrete, transmitting terminal the technology such as scheme of Effect-based operation transmission or shared drive can realize the foundation of communication port.
Wherein, can be transmitting terminal assignment messages notification area Mx and for receiving end assignment messages notification area My in internal memory in the process of establishing of communication port, message informing district can realize based on the mode such as array or annular chain meter.
102, transmitting terminal enters kernel spacing by system call, and by the channel number of communication port and the first parameter read-in kernel spacing.
Concrete, while transmitting terminal enters kernel spacing by system call, carry the channel number of communication port and the first parameter in transmitting terminal and by this first parameter read-in kernel spacing.
103, transmitting terminal is according to the channel number of communication port, obtains the shared page table of receiving end.
Concrete, transmitting terminal is according to the channel number of communication port, the shared page table obtaining receiving end can be: transmitting terminal can find according to the channel number of communication port the receiving end communicated with this transmitting terminal, then in kernel spacing, the process control block (PCB) corresponding with this receiving end is searched, afterwards according to the page directory address of the receiving end in process control block (PCB), obtain the shared page table of receiving end.
Or transmitting terminal, according to the channel number of communication port, obtains the shared page table of receiving end.
Wherein, shared page table is the page table for the physical address of mapping message place memory pages in the page table that page directory is corresponding.
104, transmitting terminal is by the physical address map of the message place memory pages of acquisition in the continuous free page list item of the shared page table of receiving end, obtains the new virtual address of message.
Concrete, first can obtain page table entry idle continuously from shared page table, then by the page table entry of the continuous free time of the physical address map to this shared page table that acquire message.
105, transmitting terminal by the new virtual address of message and the first parameter stored in the message informing district of receiving end, so that receiving end reads new virtual address and the first parameter that message informing district obtains message, and read the message with corresponding length according to new virtual address.
Wherein, message informing district distributes in communication port process of establishing.
The method of the interprocess communication that embodiments of the invention provide, by transmitting terminal by the physical address map of message to obtain receiving end shared page table continuous free page list item page in, obtain the new virtual address of this message, and by new virtual address stored in the message informing district of receiving end, achieve receiving end in zero-copy scheme need not pass in and out kernel spacing and just can read message, avoid the time overhead of receiving end turnover kernel spacing, decrease the disturbance to receiving end high-speed cache simultaneously.
Embodiments of the invention provide a kind of method of interprocess communication, in the kernel that the method is applied to single kernel or many core system in zero-copy scheme, first shared page table is the page table of page directory item correspondence original in page directory, with reference to shown in Fig. 2, transmitting terminal and receiving end can be the different processes in same system, and the method comprises the following steps:
201, transmitting terminal sets up the communication port with receiving end.
Concrete, the technology such as scheme of Effect-based operation transmission or shared drive can realize the foundation of communication port.In the process of establishing of communication port, be transmitting terminal assignment messages notification area Mx, be receiving end assignment messages notification area My simultaneously.Wherein, message informing district can realize based on the mode such as array or annular chain meter.Have multiple slot in message informing district, corresponding content can be preserved in each slot.Wherein, the message informing district of receiving end is mapped to the address space of oneself by transmitting terminal, the message informing district of transmitting terminal is mapped to the address space of oneself by receiving end, and realize the message informing district that transmitting terminal can access receiving end, receiving end can access the message informing district of transmitting terminal.
202, transmitting terminal enters kernel spacing by system call, and by the channel number of communication port and the first parameter read-in kernel spacing.
Wherein, the first parameter comprises: the virtual address of message and the length of message.
203, the virtual address of transmitting terminal according to message and the length of message, obtain the physical address of message.
Concrete, this step can be that the kernel of transmitting terminal realizes, if transmitting terminal can be process Px, then the kernel of process Px finds the corresponding page table in process Px according to the virtual address of message, then in this page table, obtain the address list comprising the physical page of message, obtain the physical address of message.Wherein, the length of message physical page address list can be K.
204, transmitting terminal is according to the channel number of communication port, obtains receiving end.
205, transmitting terminal is according to the relation mapping table between process corresponding to receiving end and process control block (PCB), obtains the process control block (PCB) that receiving end is corresponding.
Wherein, the relation mapping table between the process that receiving end is corresponding and process control block (PCB) is stored in advance in kernel spacing.
Step 204 and step 205 can be that the kernel of transmitting terminal realizes, if transmitting terminal can be process Px, then the kernel of process Px can obtain according to the channel number of communication port the receiving end process Py communicated with transmitting terminal process Px.And the relation mapping table between the process be stored in advance in kernel spacing and process control block (PCB), find the process control block (PCB) that receiving end process Py is corresponding.
Wherein, page directory address is comprised in process control block (PCB).
206, transmitting terminal is according to the page directory address of the receiving end in process control block (PCB), obtains the first shared page table of receiving end.
Wherein, the first shared page table is the page table for carrying out list of physical addresses mapping, and the first shared page table of transmitting terminal and the first shared page table of receiving end share Same Physical memory pages or the different physical memory page in kernel spacing.
Concrete, this step can be that the kernel of transmitting terminal realizes.Transmitting terminal kernel, by finding the page directory address of receiving end in the process control block (PCB) of receiving end, according to the identification information in page table entry in the page table of page directory, has the page table of continuous free page list item as the first shared page table under choosing page directory.
207, transmitting terminal checks the page table entry of the first shared page table of receiving end, obtains the continuous free page list item that can hold message.
208, transmitting terminal is by the physical address map of the message place memory pages of acquisition in the continuous free page list item of the first shared page table, obtains the new virtual address of message.
Step 207 and step 208 can be that the kernel of transmitting terminal realizes, and the kernel of transmitting terminal is in the page table entry of the first shared page table, and searching length idle is continuously the page table entry of K.And be in the page table entry of K by the physical address map of the message obtained before to the continuous idle length obtained, thus obtain the new virtual address of message.
209, transmitting terminal by the new virtual address of message and the first parameter stored in the message informing district of receiving end, so that receiving end reads new virtual address and the first parameter that message informing district obtains message, and read the message with corresponding length according to new virtual address.
Wherein, message informing district distributes in communication port process of establishing.
This step can be specifically that the kernel of transmitting terminal realizes.
Concrete, receiving end reads new virtual address and the first parameter that message informing district obtains message, and according to a kind of possible implementation that new virtual address reading has the message of corresponding length be: receiving end is in the message informing district of receiving end, obtain the new virtual address of message and the length of message, the new virtual address according to information reads the message with corresponding length in the internal memory of correspondence.Receiving end can not need to pass in and out kernel spacing, as long as the virtual address of message is recorded in the message informing district of receiving end by transmitting terminal, the message informing district that receiving end directly accesses oneself can obtain the address of message, thus message is read in the internal memory of correspondence, avoid time overhead, decrease disturbance to high-speed cache.And then the work efficiency of receiving end is effectively improved.
The method of the interprocess communication that embodiments of the invention provide, by transmitting terminal by the physical address map of message to obtain receiving end shared page table continuous free page list item page in, obtain the new virtual address of this message, and by new virtual address stored in the message informing district of receiving end, achieve receiving end in zero-copy scheme need not pass in and out kernel spacing and just can read message, avoid the time overhead of receiving end turnover kernel spacing, decrease the disturbance to receiving end high-speed cache simultaneously.
Embodiments of the invention provide a kind of method of interprocess communication, in the kernel that the method is applied to single kernel or many core system in zero-copy scheme, first shared page table is the page table of newly-increased page directory item correspondence, with reference to shown in Fig. 3, transmitting terminal and receiving end can be the different processes in same system, and the method comprises the following steps:
301, transmitting terminal sets up the communication port with receiving end.
Concrete, the technology such as scheme of Effect-based operation transmission or shared drive can realize the foundation of communication port.In the process of establishing of communication port, be transmitting terminal assignment messages notification area Mx, be receiving end assignment messages notification area My simultaneously.Wherein, message informing district can realize based on the mode such as array or annular chain meter.Have multiple slot in message informing district, corresponding content can be preserved in each slot.Wherein, the message informing district of receiving end is mapped to the address space of oneself by transmitting terminal, the message informing district of transmitting terminal is mapped to the address space of oneself by receiving end, and realize the message informing district that transmitting terminal can access receiving end, receiving end can access the message informing district of transmitting terminal.
302, transmitting terminal obtains the space of a page size as the first shared page table from memory headroom.
303, the first shared page table is mapped in the page directory of receiving end by transmitting terminal.
Concrete, transmitting terminal applies for that the space of a page size is as the first shared page table in advance in memory headroom, and is mapped in the page directory of receiving end by the first shared page table, for the physical address of storing message in zero-copy process.Or optionally, receiving end applies for that the space of a page size is as the first shared page table in advance in memory headroom, and is mapped in the page directory of receiving end by this first shared page table.
Wherein, on performing, dividing of sequencing is not had between step 301 and step 302 ~ 303 in the present embodiment, that is in the operation of reality, step 301 can be carried out with step 302 ~ 303 simultaneously, namely transmitting terminal is set up with the process of the communication port of receiving end, obtains the space of a page size as the first shared page table from memory headroom.And this first shared page table is mapped in the page directory of receiving end.
304, transmitting terminal enters kernel spacing by system call, and by the channel number of communication port and the first parameter read-in kernel spacing.
Wherein, the first parameter comprises: the virtual address of message and the length of message.
Wherein, step 301 ~ 304 can be the kernel realizations of transmitting terminal.
305, the virtual address of transmitting terminal according to message and the length of message, obtain the physical address of message.
Concrete, this step can be that the kernel of transmitting terminal realizes, if transmitting terminal can be process Px, then the kernel of process Px finds the corresponding page table in process Px according to the virtual address of message, then in this page table, obtain the address list comprising the physical page of message, obtain the physical address of message.Wherein, the length of message physical page address list can be K.
306, transmitting terminal is according to the channel number of communication port, obtains receiving end.
307, transmitting terminal is according to the relation mapping table between process corresponding to receiving end and process control block (PCB), obtains the process control block (PCB) that receiving end is corresponding.
Wherein, the relation mapping table between the process that receiving end is corresponding and process control block (PCB) is stored in advance in kernel spacing.
Step 306 and step 307 can be that the kernel of transmitting terminal realizes.
Wherein, page directory address is comprised in process control block (PCB).
308, transmitting terminal is according to the page directory address of the receiving end in process control block (PCB), obtains the first shared page table of receiving end.
Wherein, first shared page table is the page table for carrying out list of physical addresses mapping of newly-increased page directory item correspondence, and the first shared page table of transmitting terminal and the first shared page table of receiving end share Same Physical memory pages or the different physical memory page in kernel spacing.
Concrete, this step can be that the kernel of transmitting terminal realizes.Transmitting terminal kernel, by finding the page directory address of receiving end in the process control block (PCB) of receiving end, according to the identification information in page table entry in the page table of page directory, has the page table of continuous free page list item as the first shared page table under choosing page directory.
309, transmitting terminal checks the page table entry of the first shared page table of receiving end, obtains the continuous free page list item that can hold message.
310, transmitting terminal is by the physical address map of the message place memory pages of acquisition in the continuous free page list item of the first shared page table, obtains the new virtual address of message.
Step 309 and step 310 can be that the kernel of transmitting terminal realizes.
311, transmitting terminal by the new virtual address of message and the first parameter stored in the message informing district of receiving end, so that receiving end reads new virtual address and the first parameter that message informing district obtains message, and read the message with corresponding length according to new virtual address.
Wherein, message informing district distributes in communication port process of establishing.
This step can be specifically that the kernel of transmitting terminal realizes.
Concrete, receiving end reads new virtual address and the first parameter that message informing district obtains message, and according to a kind of possible implementation that new virtual address reading has the message of corresponding length be: receiving end is in the message informing district of receiving end, obtain the new virtual address of message and the length of message, the new virtual address according to information reads the message with corresponding length in the internal memory of correspondence.Receiving end can not need to pass in and out kernel spacing, as long as the virtual address of message is recorded in the message informing district of receiving end by transmitting terminal, the message informing district that receiving end directly accesses oneself can obtain the address of message, thus message is read in the internal memory of correspondence, avoid time overhead, decrease disturbance to high-speed cache.And then the work efficiency of receiving end is effectively improved.
Concrete, the explanation of step same with the above-mentioned embodiment in the present embodiment with reference to the explanation in above-described embodiment, can be repeated no more herein.
The method of the interprocess communication that embodiments of the invention provide, by transmitting terminal by the physical address map of message to obtain receiving end shared page table continuous free page list item page in, obtain the new virtual address of this message, and by new virtual address stored in the message informing district of receiving end, achieve receiving end in zero-copy scheme need not pass in and out kernel spacing and just can read message, avoid the time overhead of receiving end turnover kernel spacing, decrease the disturbance to receiving end high-speed cache simultaneously.
Embodiments of the invention provide a kind of method of interprocess communication, and the method is applied in the interior internuclear zero-copy scheme of many core system, and with reference to shown in Fig. 4, transmitting terminal and receiving end can be the different processes in same system, and the method comprises the following steps:
401, transmitting terminal sets up the communication port with receiving end.
402, transmitting terminal obtains the space of a page size as the second shared page table from memory headroom.
403, the second shared page table is mapped in the page directory of transmitting terminal and receiving end by transmitting terminal.
Concrete, transmitting terminal applies for that the space of a page size is as the second shared page table in advance in memory headroom, and the second shared page table is mapped in the page directory of transmitting terminal, this second shared page table is mapped in the page directory of receiving end, for the physical address of storing message in zero-copy process by transmitting terminal notice receiving end simultaneously.
Second shared page table is the page table for carrying out list of physical addresses mapping, and the second shared page table of transmitting terminal and the second shared page table of receiving end share Same Physical memory pages in kernel spacing.Transmitting terminal can operate the second shared page table of receiving end, and receiving end can operate the second shared page table of transmitting terminal.Wherein, the position of the page directory item at the second shared page table place of transmitting terminal is identical with the position of the page directory item at the second shared page table place of receiving end.
Wherein, on performing, dividing of sequencing is not had between step 401 and step 402 ~ 403 in the present embodiment, that is in the operation of reality, step 401 can be carried out with step 402 ~ 403 simultaneously, namely transmitting terminal is set up with the process of the communication port of receiving end, obtains the space of a page size as the second shared page table from memory headroom.And this second shared page table is mapped in the page directory of transmitting terminal and receiving end.
404, transmitting terminal enters kernel spacing by system call, and by the channel number of communication port and the first parameter read-in kernel spacing.
Wherein, the first parameter comprises: the virtual address of message and the length of message.
405, the virtual address of transmitting terminal according to message and the length of message, obtains the physical address of message place memory pages.
Concrete, this step can be that the kernel of transmitting terminal realizes, if transmitting terminal can be process Px, then the kernel of process Px finds the corresponding page table in process Px according to the virtual address of message, then in this page table, obtain the address list comprising the physical page of message, obtain the physical address of message.Wherein, the length of message physical page address list can be K.
406, transmitting terminal is according to the channel number of communication port, obtains the second shared page table of receiving end.
Wherein, the second shared page table is the page table for carrying out physical address map of newly-increased page directory item correspondence.
Concrete, transmitting terminal is process Px, and receiving end is process Py, and transmitting terminal is according to the channel number of communication port, the second shared page table obtaining receiving end can be: process Px, according to the channel number of communication port, finds the second shared page table be associated with process Py in the page directory of process Px.Because the second shared page table is the shared page table that the transmitting terminal set up in communication port process of establishing and receiving end all can operate mutually, therefore, process Px can directly carry out the physical address map of message to the operation in the page table entry of the continuous free time of this second shared page table in second shared page table of process Py.
407, transmitting terminal checks the page table entry of the second shared page table of receiving end, obtains the continuous free page list item that can hold message.
408, transmitting terminal is by the physical address map of the message place memory pages of acquisition in the continuous free page list item of the second shared page table, obtains the new virtual address of message.
409, transmitting terminal by the new virtual address of message and the first parameter stored in the message informing district of receiving end, so that receiving end reads new virtual address and the first parameter that message informing district obtains message, and read the message with corresponding length according to new virtual address.
Wherein, message informing district distributes in communication port process of establishing.
Concrete, step 405 ~ 409 can be that the kernel of transmitting terminal realizes.
Concrete, receiving end reads new virtual address and the first parameter that message informing district obtains message, and according to a kind of possible implementation that new virtual address reading has the message of corresponding length be: receiving end is in the message informing district of receiving end, obtain the new virtual address of message and the length of message, the new virtual address according to information reads the message with corresponding length in the internal memory of correspondence.
The explanation of step same with the above-mentioned embodiment in the present embodiment with reference to the explanation in above-described embodiment, can be repeated no more herein.
The method of the interprocess communication that embodiments of the invention provide, by transmitting terminal by the physical address map of message to obtain receiving end shared page table continuous free page list item page in, obtain the new virtual address of this message, and by new virtual address stored in the message informing district of receiving end, achieve receiving end in zero-copy scheme need not pass in and out kernel spacing and just can read message, avoid the time overhead of receiving end turnover kernel spacing, decrease the disturbance to receiving end high-speed cache simultaneously.
Embodiments of the invention provide a kind of method of interprocess communication, the method is applied to based in zero-copy scheme in single kernel of Capability model or the kernel of many core system, first shared page table is the page table of page directory item correspondence original in page directory, with reference to shown in Fig. 5, transmitting terminal and receiving end can be the different processes in same system, and the method comprises the following steps:
501, transmitting terminal sets up the communication port with receiving end.
Concrete, the technology such as scheme of Effect-based operation transmission or shared drive can realize the foundation of communication port.In the process of establishing of communication port, be transmitting terminal assignment messages notification area Mx, be receiving end assignment messages notification area My simultaneously.Wherein, message informing district can realize based on the mode such as array or annular chain meter.Have multiple slot in message informing district, corresponding content can be preserved in each slot.Wherein, the message informing district of receiving end is mapped to the address space of oneself by transmitting terminal, the message informing district of transmitting terminal is mapped to the address space of oneself by receiving end, and realize the message informing district that transmitting terminal can access receiving end, receiving end can access the message informing district of transmitting terminal.
502, the ability that the internal memory of transmitting terminal acquisition storing message is corresponding quotes (CapabilityReference is called for short capref) and ability quotes capref skew.
Transmitting terminal can be inquired about ability corresponding to the internal memory of storing message and quote and quote skew with ability in the internal data structure of user's space.
503, transmitting terminal enters kernel spacing by system call, and by the channel number of communication port and the first parameter read-in kernel spacing.
Wherein the first parameter comprises: ability is quoted, ability quotes skew, the length of message page bias internal and message.
504, transmitting terminal is according to the channel number of communication port, obtains receiving end.
505, transmitting terminal is according to the relation mapping table between process corresponding to receiving end and process control block (PCB), obtains the process control block (PCB) that receiving end is corresponding.
Wherein, the relation mapping table between the process that receiving end is corresponding and process control block (PCB) is stored in advance in kernel spacing.
Optionally, ability is quoted ability space (the Capability Space of ability Capability corresponding to capref stored in receiving end by transmitting terminal, be called for short CSpace) in, so that receiving end needs forwarding messages to when being different from another process of transmitting terminal, the physical memory area of message can be read, carry out the forwarding of message.
Wherein, ability quotes the physical memory area containing message in corresponding ability.
506, transmitting terminal is according to the page directory address of the receiving end in process control block (PCB), obtains the first shared page table of receiving end.
Wherein, the first shared page table is the page table for carrying out list of physical addresses mapping, and the first shared page table of transmitting terminal and the first shared page table of receiving end share Same Physical memory pages or the different physical memory page in kernel spacing.
507, transmitting terminal checks the page table entry of the first shared page table of receiving end, obtains the continuous free page list item that can hold message.
508, transmitting terminal is by the physical address map of the message place memory pages of acquisition in the continuous free page list item of the first shared page table, obtains the new virtual address of message.
Concrete, the length of continuous free page list item is decided jointly by message page bias internal and message-length.
509, transmitting terminal by the new virtual address of message and the first parameter stored in the message informing district of receiving end, so that receiving end reads new virtual address and the first parameter that message informing district obtains message, and read the message with corresponding length according to new virtual address.
Wherein, message informing district distributes in communication port process of establishing.
Concrete, step 504 ~ 509 can be that the kernel of transmitting terminal realizes.
Concrete, receiving end reads new virtual address and the first parameter that message informing district obtains message, and according to a kind of possible implementation that new virtual address reading has the message of corresponding length be: receiving end is in the message informing district of receiving end, obtain the new virtual address of message, the ability of receiving end is quoted, the ability of receiving end quotes skew, message page bias internal and message-length, and according to the new virtual address of message, message-length, the ability of receiving end is quoted, the ability of receiving end quote ability that skew preserves page virtual address and receiving end in internal data structure quote between corresponding relation and the ability of page virtual address and receiving end quote corresponding relation between skew, in order to the integrality of service data structure.Meanwhile, in the internal memory of correspondence, the message with corresponding length is read according to the new virtual address of message.Wherein, page virtual address obtains according to the new virtual address of message.
In the present embodiment, transmitting terminal does not need the physical address being obtained message by the virtual address of message and the length of message, but obtains the physical address of message by reading capability corresponding to capref, more improves work efficiency.
The explanation of step same with the above-mentioned embodiment in the present embodiment with reference to the explanation in above-described embodiment, can be repeated no more herein.
The method of the interprocess communication that embodiments of the invention provide, by transmitting terminal by the physical address map of message to obtain receiving end shared page table continuous free page list item page in, obtain the new virtual address of this message, and by new virtual address stored in the message informing district of receiving end, achieve receiving end in zero-copy scheme need not pass in and out kernel spacing and just can read message, avoid the time overhead of receiving end turnover kernel spacing, decrease the disturbance to receiving end high-speed cache simultaneously.
Embodiments of the invention provide a kind of method of interprocess communication, the method is applied to based in zero-copy scheme in single kernel of Capability model or the kernel of many core system, first shared page table is the page table of newly-increased page directory item correspondence, with reference to shown in Fig. 6, transmitting terminal and receiving end can be the different processes in same system, and the method comprises the following steps:
601, transmitting terminal sets up the communication port with receiving end.
Concrete, the technology such as scheme of Effect-based operation transmission or shared drive can realize the foundation of communication port.In the process of establishing of communication port, be transmitting terminal assignment messages notification area Mx, be receiving end assignment messages notification area My simultaneously.Wherein, message informing district can realize based on the mode such as array or annular chain meter.Have multiple slot in message informing district, corresponding content can be preserved in each slot.Wherein, the message informing district of receiving end is mapped to the address space of oneself by transmitting terminal, the message informing district of transmitting terminal is mapped to the address space of oneself by receiving end, and realize the message informing district that transmitting terminal can access receiving end, receiving end can access the message informing district of transmitting terminal.
602, transmitting terminal obtains the space of a page size as the first shared page table from memory headroom.
603, the first shared page table is mapped in the page directory of receiving end by transmitting terminal.
Wherein, on performing, dividing of sequencing is not had between step 601 and step 602 ~ 603 in the present embodiment, that is in the operation of reality, step 601 can be carried out with step 602 ~ 603 simultaneously, namely transmitting terminal is set up with the process of the communication port of receiving end, obtains the space of a page size as the first shared page table from memory headroom.And this first shared page table is mapped in the page directory of receiving end.
604, the ability that the internal memory of transmitting terminal acquisition storing message is corresponding quotes (CapabilityReference is called for short capref) and ability quotes capref skew.
605, transmitting terminal enters kernel spacing by system call, and by the channel number of communication port and the first parameter read-in kernel spacing.
Wherein the first parameter comprises: ability is quoted, ability quotes skew, the length of message page bias internal and message.
606, transmitting terminal is according to the channel number of communication port, obtains receiving end.
607, transmitting terminal is according to the relation mapping table between process corresponding to receiving end and process control block (PCB), obtains the process control block (PCB) that receiving end is corresponding.
Wherein, the relation mapping table between the process that receiving end is corresponding and process control block (PCB) is stored in advance in kernel spacing.
Optionally, ability is quoted ability space (the Capability Space of ability Capability corresponding to capref stored in receiving end by transmitting terminal, be called for short CSpace) in, so that receiving end needs forwarding messages to when being different from another process of transmitting terminal, the physical memory area of message can be read, carry out the forwarding of message.
Wherein, ability quotes the physical memory area containing message in corresponding ability.
608, transmitting terminal is according to the page directory address of the receiving end in process control block (PCB), obtains the first shared page table of receiving end.
Wherein, first shared page table is the page table for carrying out list of physical addresses mapping of newly-increased page directory item correspondence, and the first shared page table of transmitting terminal and the first shared page table of receiving end share Same Physical memory pages or the different physical memory page in kernel spacing.
609, transmitting terminal checks the page table entry of the first shared page table of receiving end, obtains the continuous free page list item that can hold message.
Wherein, the length of this continuous free page list item is identical with the length of message.
610, transmitting terminal is by the physical address map of the message place memory pages of acquisition in the continuous free page list item of the first shared page table, obtains the new virtual address of message.
Concrete, the length of continuous free page list item is decided jointly by message page bias internal and message-length.
611, transmitting terminal by the new virtual address of message and the first parameter stored in the message informing district of receiving end, so that receiving end reads new virtual address and the first parameter that message informing district obtains message, and read the message with corresponding length according to new virtual address.
Wherein, message informing district distributes in communication port process of establishing.
Concrete, step 606 ~ 611 can be that the kernel of transmitting terminal realizes.
Concrete, receiving end reads new virtual address and the first parameter that message informing district obtains message, and according to a kind of possible implementation that new virtual address reading has the message of corresponding length be: receiving end is in the message informing district of receiving end, obtain the new virtual address of message, the ability of receiving end is quoted, the ability of receiving end quotes skew, message page bias internal and message-length, and according to the new virtual address of message, message-length, the ability of receiving end is quoted, the ability of receiving end quote ability that skew preserves page virtual address and receiving end in internal data structure quote between corresponding relation and the ability of page virtual address and receiving end quote corresponding relation between skew, in order to the integrality of service data structure.Meanwhile, in the internal memory of correspondence, the message with corresponding length is read according to the new virtual address of message.Wherein, page virtual address obtains according to the new virtual address of message.
In the present embodiment, transmitting terminal does not need the physical address being obtained message by the virtual address of message and the length of message, but obtains the physical address of message by reading capability corresponding to capref, more improves work efficiency.
The explanation of step same with the above-mentioned embodiment in the present embodiment with reference to the explanation in above-described embodiment, can be repeated no more herein.
The method of the interprocess communication that embodiments of the invention provide, by transmitting terminal by the physical address map of message to obtain receiving end shared page table continuous free page list item page in, obtain the new virtual address of this message, and by new virtual address stored in the message informing district of receiving end, achieve receiving end in zero-copy scheme need not pass in and out kernel spacing and just can read message, avoid the time overhead of receiving end turnover kernel spacing, decrease the disturbance to receiving end high-speed cache simultaneously.
Based on above-described embodiment, the present invention can also realize the message that receiving end reads transmitting terminal transmission based on method below, the method is applied in the internuclear zero-copy scheme based on many core system of Capability model, and the method is specifically as follows: a, process Px and Py set up passage.B, process Px apply for the space of a page size from internal memory, the kernel of process Px by this page-map in the page directory of process Px, as second shared page table of process Px, simultaneously, the kernel of process Py by this page-map in the page directory of process Py, as second shared page table of process Py; C, process Px inquire about ability corresponding to the internal memory of storing message and quote and quote skew with ability in the internal data structure of user's space; D, process Px by system call, enter kernel spacing and by the channel number of communication port and the first parameter read-in kernel spacing.Wherein the first parameter comprises: ability is quoted, ability quotes skew, the length of message page bias internal and message.The kernel of e, process Px, according to channel number, finds the second shared page table be associated with process Py in process Px page directory.The kernel of f, process Px is by the page table entry in inspection second shared page table, and obtain the continuous free page list item that length is k, the length k of continuous free page list item can determine according to message page bias internal and message-length.The kernel of g, process Px is quoted according to ability and search corresponding ability in the ability space of process Px, and this ability contains the physical address information of message place region of memory.The kernel of process Px by the physical page address list mapping of message internal memory in the page table entry of the continuous free time of this second shared page table.The passage that the kernel of h, process Px is set up by process Px and process Py, by map obtain new message virtual address, message-length, capref skew, and ability quotes the kernel that capability corresponding to capref sends to process Py place, this Capability is put into the CSpace of process Py by process Py place kernel, and capref and capref of the new virtual address of message, message-length, sensing process Py is offset the idle slot in the message informing district My of write process Py.I, process Py obtain the new virtual address of message, message-length, capref and capref skew from message informing district My.And according to message virtual address, message-length, capref and capref skew, in internal data structure, preserve the corresponding relation that page virtual address and capref or capref offset, for the integrality of maintain internal data structure; Meanwhile, from internal memory, read the message of corresponding length.
Embodiments of the invention provide a kind of device 7 of interprocess communication, the method of the interprocess communication that this device 7 provides for the embodiment of the method realizing the arbitrary correspondence in Fig. 1 ~ Fig. 6, with reference to shown in Fig. 7, this device 7 comprises: creating unit 71, processing unit 72, acquiring unit 73 and storage unit 74, wherein:
Creating unit 71, for setting up the communication port communicated with receiving end.
Concrete, the technology such as scheme of Effect-based operation transmission or shared drive can realize the foundation of communication port.In the process of establishing of communication port, be transmitting terminal assignment messages notification area Mx, be receiving end assignment messages notification area My simultaneously.Wherein, message informing district can realize based on the mode such as array or annular chain meter.Have multiple slot in message informing district, corresponding content can be preserved in each slot.Wherein, the message informing district of receiving end is mapped to the address space of oneself by transmitting terminal, the message informing district of transmitting terminal is mapped to the address space of oneself by receiving end, and realize the message informing district that transmitting terminal can access receiving end, receiving end can access the message informing district of transmitting terminal.
Processing unit 72, for entering kernel spacing by system call, and by the channel number of communication port and the first parameter read-in kernel spacing.
Acquiring unit 73, for obtaining the channel number of communication port according to processing unit 72, obtains the shared page table of receiving end.
Wherein, shared page table is the page table for the physical address of mapping message place memory pages in the page table that page directory is corresponding.
Processing unit 72, also acquires to acquiring unit 73 for the physical address map of the message place memory pages by acquisition in the continuous free page list item of the shared page table of receiving end, obtains the new virtual address of message.
Storage unit 74, for the new virtual address of message that processing unit 72 is obtained and the first parameter stored in the message informing district of receiving end, so that receiving end reads new virtual address and the first parameter that message informing district obtains message, and read the message with corresponding length according to new virtual address.
Wherein, message informing district distributes in communication port process of establishing.
The device of the interprocess communication that embodiments of the invention provide, by transmitting terminal by the physical address map of message to obtain receiving end shared page table continuous free page list item page in, obtain the new virtual address of this message, and by new virtual address stored in the message informing district of receiving end, achieve receiving end in zero-copy scheme need not pass in and out kernel spacing and just can read message, avoid the time expense of receiving end turnover kernel spacing, decrease the disturbance to receiving end high-speed cache simultaneously.
Further, the first parameter comprises: the ability of transmitting terminal is quoted, the ability of transmitting terminal quotes skew, the length of message page bias internal and message,
Acquiring unit 73, also quotes for the ability that the internal memory obtaining storing message is corresponding and quotes skew with ability.
Optionally, storage unit 74, also for ability being quoted ability Capability corresponding to capref stored in the ability space CSpace of receiving end, so that receiving end needs forwarding messages to when being different from another process of transmitting terminal, the physical memory area of message can be read, carry out the forwarding of message.
Wherein, ability quotes the physical memory area containing message in corresponding ability.
Concrete, with reference to shown in Fig. 8, acquiring unit 73 comprises: the first acquisition module 731, second acquisition module 732, wherein:
First acquisition module 731, for the channel number according to communication port, obtains the process control block (PCB) that receiving end is corresponding.
Second acquisition module 732, for the page directory address according to the receiving end in the process control block (PCB) of the first acquisition module 731 acquisition, obtains the shared page table of receiving end.
Concrete, the first acquisition module is specifically for performing following steps:
According to the channel number of communication port, obtain receiving end.
Relation mapping table between the process corresponding according to receiving end and process control block (PCB), obtains the process control block (PCB) that receiving end is corresponding.
Wherein, the relation mapping table between the process that receiving end is corresponding and process control block (PCB) is stored in advance in kernel spacing.
Concrete, with reference to shown in Fig. 9, processing unit 72 comprises: detection module 721 and the 3rd acquisition module 722, wherein:
Detection module 721, for checking the page table entry of the shared page table of receiving end, obtains the continuous free page list item that can hold message.
3rd acquisition module 722, in the continuous free page list item of the shared page table obtained to detection module 721 for the physical address map of the message by acquisition, obtains the new virtual address of message.
Can be the kernel realization of transmitting terminal, if transmitting terminal can be process Px, then the kernel of process Px can obtain according to the channel number of communication port the receiving end process Py communicated with transmitting terminal process Px.And the relation mapping table between the process be stored in advance in kernel and process control block (PCB), find the process control block (PCB) that receiving end process Py is corresponding.
Wherein, page directory address is comprised in process control block (PCB).
Wherein, the first parameter comprises: the virtual address of message and the length of message, and the physical address of message obtains according to the virtual address of message and the length of message.
Shared page table is the first shared page table.
Wherein, the first shared page table is the page table for carrying out list of physical addresses mapping, and the first shared page table of transmitting terminal and the first shared page table of receiving end share Same Physical memory pages or the different physical memory page in kernel spacing.
Or shared page table is the second shared page table.
Wherein, the second shared page table is the page table for carrying out list of physical addresses mapping, and the second shared page table of transmitting terminal and the second shared page table of described receiving end share Same Physical memory pages in kernel spacing.
Further, acquiring unit 73, also for obtaining the space of a page size as shared page table from internal memory.
Processing unit 72, also for being mapped in the page directory of transmitting terminal and receiving end by shared page table.
Concrete, receiving end reads new virtual address and the first parameter that message informing district obtains message, and according to a kind of possible implementation that new virtual address reading has the message of corresponding length be: receiving end is in the message informing district of receiving end, obtain the new virtual address of message and the length of message, the new virtual address according to information reads the message with corresponding length in the internal memory of correspondence.Receiving end can not need to pass in and out kernel spacing, as long as the virtual address of message is recorded in the message informing district of receiving end by transmitting terminal, the message informing district that receiving end directly accesses oneself can obtain the address of message, thus message is read in the internal memory of correspondence, avoid time overhead, decrease disturbance to high-speed cache.And then the work efficiency of receiving end is effectively improved.
It should be noted that, the implementation of each unit in the device of the interprocess communication in the present embodiment and reciprocal process can with reference to the associated description in correlation method embodiment.
The device of the interprocess communication that embodiments of the invention provide, by transmitting terminal by the physical address map of message to obtain receiving end shared page table continuous free page list item page in, obtain the new virtual address of this message, and by new virtual address stored in the message informing district of receiving end, achieve receiving end in zero-copy scheme need not pass in and out kernel spacing and just can read message, avoid the time overhead of receiving end turnover kernel spacing, decrease the disturbance to receiving end high-speed cache simultaneously.
Embodiments of the invention provide a kind of device 8 of interprocess communication, the method of the interprocess communication that this device provides for the embodiment of the method realizing the arbitrary correspondence in Fig. 1 ~ Fig. 6, with reference to shown in Figure 10, this device comprises: at least one processor 801, storer 802, communication interface 803 and bus 804, at least one processor 801, storer 802 and communication interface 803 are connected by bus 804 and complete mutual communication, storer 801 for program code stored, wherein:
This bus 804 can be industry standard architecture (Industry StandardArchitecture, referred to as ISA) bus, peripheral component interconnect (Peripheral ComponentInterconnect, referred to as PCI) bus or extended industry-standard architecture (ExtendedIndustry Standard Architecture, referred to as EISA) bus etc.This bus 804 can be divided into address bus, data bus, control bus etc.For ease of representing, only representing with a thick line in Figure 10, but not representing the bus only having a bus or a type.Wherein:
Storer 802 is for program code stored, and this program code comprises operational order.Storer 802 may comprise high-speed RAM storer, still may comprise nonvolatile memory (non-volatile memory), such as at least one magnetic disk memory.
Processor 801 may be a central processing unit (Central Processing Unit, referred to as CPU), or specific integrated circuit (Application Specific IntegratedCircuit, referred to as ASIC), or be configured to the one or more integrated circuit implementing the embodiment of the present invention.
Communication interface 803, is mainly used in realizing the communication between the device in the present embodiment.
Processor 801, also for calling the program code in storer 802, in order to perform following operation:
Transmitting terminal sets up the communication port with receiving end.
Concrete, the technology such as scheme of Effect-based operation transmission or shared drive can realize the foundation of communication port.In the process of establishing of communication port, be transmitting terminal assignment messages notification area Mx, be receiving end assignment messages notification area My simultaneously.Wherein, message informing district can realize based on the mode such as array or annular chain meter.Have multiple slot in message informing district, corresponding content can be preserved in each slot.Wherein, the message informing district of receiving end is mapped to the address space of oneself by transmitting terminal, the message informing district of transmitting terminal is mapped to the address space of oneself by receiving end, and realize the message informing district that transmitting terminal can access receiving end, receiving end can access the message informing district of transmitting terminal.
Kernel spacing is entered by system call, and by the channel number of communication port and the first parameter read-in kernel spacing.
According to the channel number of communication port, obtain the shared page table of receiving end.
Wherein, shared page table is the page table for the physical address of mapping message place memory pages in the page table that page directory is corresponding.
By the physical address map of the message place memory pages of acquisition in the continuous free page list item of the shared page table of receiving end, obtain the new virtual address of message.
By the new virtual address of message and the first parameter stored in the message informing district of receiving end, so that receiving end reads new virtual address and the first parameter that message informing district obtains message, and read the message with corresponding length according to new virtual address.
Wherein, message informing district distributes in communication port process of establishing.
The device of the interprocess communication that embodiments of the invention provide, by transmitting terminal by the physical address map of message to obtain receiving end shared page table continuous free page list item page in, obtain the new virtual address of this message, and by new virtual address stored in the message informing district of receiving end, achieve receiving end in zero-copy scheme need not pass in and out kernel spacing and just can read message, avoid the time expense of receiving end turnover kernel spacing, decrease the disturbance to receiving end high-speed cache simultaneously.
Further, the first parameter comprises: ability is quoted, ability quotes skew, the length of message page bias internal and message, and processor 801 is also for performing following steps:
Obtain ability corresponding to the internal memory of storing message to quote and quote skew with ability.
Optionally, processor 801, also for ability being quoted ability Capability corresponding to capref stored in the ability space CSpace of receiving end, so that receiving end needs forwarding messages to when being different from another process of transmitting terminal, the physical memory area of message can be read, carry out the forwarding of message.
Wherein, ability quotes the physical memory area containing message in corresponding ability.
Concrete, processor 801 is also for performing following steps:
According to the channel number of communication port, obtain the process control block (PCB) that receiving end is corresponding.
According to the page directory address of the receiving end in process control block (PCB), obtain the shared page table of receiving end.
Further, processor 801 is also for performing following steps:
According to the channel number of communication port, obtain receiving end.
Relation mapping table between the process corresponding according to receiving end and process control block (PCB), obtains the process control block (PCB) that receiving end is corresponding.
Wherein, the relation mapping table between the process that receiving end is corresponding and process control block (PCB) is stored in advance in kernel spacing.
Concrete further, processor 801 is also for performing following steps:
Check the page table entry of the shared page table of receiving end, obtain the continuous free page list item that can hold message.
By the physical address map of the message place memory pages of acquisition in the continuous free page list item of shared page table, obtain the new virtual address of message.
Wherein, the first parameter comprises: the virtual address of message and the length of message, and the physical address of message place memory pages obtains according to the virtual address of message and the length of message.
Shared page table is the first shared page table.
Wherein, the first shared page table is the page table for carrying out list of physical addresses mapping, and the first shared page table of transmitting terminal and the first shared page table of receiving end share Same Physical memory pages or the different physical memory page in kernel spacing.
Or shared page table is the second shared page table.
Wherein, the second shared page table is the page table for carrying out list of physical addresses mapping, and the second shared page table of transmitting terminal and the second shared page table of receiving end share Same Physical memory pages in kernel spacing.
Further, processor 801 is also for performing following steps:
The space of a page size is obtained as shared page table from memory headroom.
Shared page table is mapped into transmitting terminal and receiving end page directory in.
Concrete, receiving end reads new virtual address and the first parameter that message informing district obtains message, and according to a kind of possible implementation that new virtual address reading has the message of corresponding length be: receiving end is in the message informing district of receiving end, obtain the new virtual address of message and the length of message, the new virtual address according to information reads the message with corresponding length in the internal memory of correspondence.Receiving end can not need to pass in and out kernel spacing, as long as the virtual address of message is recorded in the message informing district of receiving end by transmitting terminal, the message informing district that receiving end directly accesses oneself can obtain the address of message, thus message is read in the internal memory of correspondence, avoid time overhead, decrease disturbance to high-speed cache.And then the work efficiency of receiving end is effectively improved.
It should be noted that, the implementation between each device in the device of the interprocess communication in the present embodiment and reciprocal process can with reference to the associated description in correlation method embodiment.
The device of the interprocess communication that embodiments of the invention provide, by transmitting terminal by the physical address map of message to obtain receiving end shared page table continuous free page list item page in, obtain the new virtual address of this message, and by new virtual address stored in the message informing district of receiving end, achieve receiving end in zero-copy scheme need not pass in and out kernel spacing and just can read message, avoid the time overhead of receiving end turnover kernel spacing, decrease the disturbance to receiving end high-speed cache simultaneously.
Embodiments of the invention provide a kind of system of interprocess communication, zero-copy scheme in the kernel being applied to single core system or many core system, and with reference to shown in Figure 11, this system comprises: transmitting terminal a and receiving end b, wherein:
Transmitting terminal a, for setting up the communication port with receiving end; Kernel spacing is entered by system call, and by the channel number of communication port and the first parameter read-in kernel spacing; According to the channel number of communication port, obtain the shared page table of receiving end; Wherein, shared page table is the page table for the physical address of mapping message place memory pages in the page table that page directory is corresponding; By the physical address map of the message place memory pages of acquisition in the continuous free page list item of the shared page table of receiving end, obtain the new virtual address of message; By the new virtual address of message and the first parameter stored in the message informing district of receiving end.
Receiving end b, for reading new virtual address and first parameter of the message that transmitting terminal a stores in message informing district; The message with corresponding length is read according to new virtual address; Wherein, message informing district distributes in communication port process of establishing.
First parameter comprises: the virtual address of message and the length of message.Wherein, the physical address of message place memory pages obtains according to the virtual address of message and the length of message.
Or the first parameter comprises that ability is quoted, ability quotes skew, the length of message page bias internal and message.
Concrete optional, transmitting terminal a, also for the channel number according to communication port, obtains receiving end; Relation mapping table between the process corresponding according to receiving end and process control block (PCB), obtains the process control block (PCB) that receiving end is corresponding; Wherein, the relation mapping table between the process that receiving end is corresponding and process control block (PCB) is stored in advance in kernel spacing.According to the page directory address of the receiving end in process control block (PCB), obtain the first shared page table of receiving end.
Concrete, transmitting terminal a, also for checking the page table entry of the first shared page table of receiving end, obtains the continuous free page list item that can hold message; By the physical address map of the message place memory pages of acquisition in the continuous free page list item of the first shared page table, obtain the new virtual address of message.
If this system is applied to based in zero-copy scheme in single kernel of Capability model or the kernel of many core system, the first parameter comprises: ability is quoted, ability quotes skew, the length of message page bias internal and message, optional:
Transmitting terminal a, also quotes for the ability that the internal memory obtaining storing message is corresponding and quotes skew with ability.
Wherein, the first shared page table is the page table for carrying out list of physical addresses mapping, and the first shared page table of transmitting terminal and the first shared page table of receiving end share Same Physical memory pages or the different physical memory page in kernel spacing.
The system of the interprocess communication that embodiments of the invention provide, by transmitting terminal by the physical address map of message to obtain receiving end shared page table continuous free page list item page in, obtain the new virtual address of this message, and by new virtual address stored in the message informing district of receiving end, achieve receiving end in zero-copy scheme need not pass in and out kernel spacing and just can read message, avoid the time overhead of receiving end turnover kernel spacing, decrease the disturbance to receiving end high-speed cache simultaneously.
Embodiments of the invention provide a kind of system of interprocess communication, are applied to the interior internuclear zero-copy scheme of many core system, and with reference to shown in Figure 12, this system comprises: transmitting terminal c and receiving end d, wherein:
Transmitting terminal c, for setting up the communication port with receiving end; Kernel spacing is entered by system call, and by the channel number of communication port and the first parameter read-in kernel spacing; According to the channel number of communication port, obtain the shared page table of receiving end; Wherein, shared page table is the page table for the physical address of mapping message place memory pages in the page table that page directory is corresponding; By the physical address map of the message place memory pages of acquisition in the continuous free page list item of the shared page table of receiving end, obtain the new virtual address of message; By the new virtual address of message and the first parameter stored in the message informing district of receiving end.
Receiving end d, for reading new virtual address and first parameter of the message that transmitting terminal c stores in message informing district; The message with corresponding length is read according to new virtual address; Wherein, message informing district distributes in communication port process of establishing.
Further, transmitting terminal c, also for obtaining the space of a page size as the second shared page table from memory headroom; Second shared page table is mapped in the page directory of transmitting terminal and receiving end.
First parameter comprises: the virtual address of message and the length of message.Wherein, the physical address of message place memory pages obtains according to the virtual address of message and the length of message.
Concrete, transmitting terminal c, for the channel number according to communication port, obtains the second shared page table of receiving end; Check the page table entry of the second shared page table of receiving end, obtain the continuous free page list item that can hold message; By the physical address map of the message place memory pages of acquisition in the continuous free page list item of the second shared page table, obtain the new virtual address of message.
Wherein, the second shared page table is the page table for carrying out list of physical addresses mapping, and the second shared page table of transmitting terminal and the second shared page table of receiving end share Same Physical memory pages in kernel spacing.
The system of the interprocess communication that embodiments of the invention provide, by transmitting terminal by the physical address map of message to obtain receiving end shared page table continuous free page list item page in, obtain the new virtual address of this message, and by new virtual address stored in the message informing district of receiving end, achieve receiving end in zero-copy scheme need not pass in and out kernel spacing and just can read message, avoid the time overhead of receiving end turnover kernel spacing, decrease the disturbance to receiving end high-speed cache simultaneously.
Those skilled in the art can be well understood to, for convenience and simplicity of description, only be illustrated with the division of above-mentioned each functional module, in practical application, can distribute as required and by above-mentioned functions and be completed by different functional modules, inner structure by device is divided into different functional modules, to complete all or part of function described above.The system of foregoing description, the specific works process of device and unit, with reference to the corresponding process in preceding method embodiment, can not repeat them here.
In several embodiments that the application provides, should be understood that, disclosed system, apparatus and method, can realize by another way.Such as, device embodiment described above is only schematic, such as, the division of described module or unit, be only a kind of logic function to divide, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of device or unit or communication connection can be electrical, machinery or other form.
The described unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the application can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form of SFU software functional unit also can be adopted to realize.
The above, above embodiment only in order to the technical scheme of the application to be described, is not intended to limit; Although with reference to previous embodiment to present application has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein portion of techniques feature; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the spirit and scope of each embodiment technical scheme of the application.Therefore, protection scope of the present invention should be as the criterion with the protection domain of described claim.
Claims (18)
1. a method for interprocess communication, is characterized in that, comprising:
Transmitting terminal sets up the communication port with receiving end;
Kernel spacing is entered by system call, and by kernel spacing described in the channel number of described communication port and the first parameter read-in;
According to the channel number of described communication port, obtain the shared page table of described receiving end; Wherein, described shared page table is for mapping the page table of the physical address of described message place memory pages in the page table that described page directory is corresponding;
By the physical address map of the described message place memory pages of acquisition in the continuous free page list item of the shared page table of described receiving end, obtain the new virtual address of message;
By the new virtual address of described message and described first parameter stored in the message informing district of described receiving end, so that described receiving end reads described message informing district obtain the new virtual address of described message and described first parameter, and read the described message with corresponding length according to described new virtual address; Wherein, described message informing district distributes in described communication port process of establishing.
2. method according to claim 1, it is characterized in that, described first parameter comprises: described ability is quoted, ability quotes skew, the length of described message page bias internal and described message, describedly enter kernel spacing by system call, and by before kernel spacing described in the channel number of described communication port and the first parameter read-in, also comprise:
Obtain and store ability corresponding to the internal memory of described message and quote and quote skew with ability.
3. method according to claim 1, is characterized in that, the described channel number according to described communication port, obtains the shared page table of described receiving end, comprising:
According to the channel number of described communication port, obtain the process control block (PCB) that described receiving end is corresponding;
According to the page directory address of the described receiving end in described process control block (PCB), obtain the first shared page table of described receiving end.
4. method according to claim 3, is characterized in that, the described channel number according to described communication port, obtains the process control block (PCB) that receiving end is corresponding, comprising:
According to the channel number of described communication port, obtain receiving end;
Relation mapping table between the process corresponding according to described receiving end and process control block (PCB), obtains the process control block (PCB) that described receiving end is corresponding; Wherein, the relation mapping table between the process that described receiving end is corresponding and process control block (PCB) is stored in advance in kernel spacing.
5. method according to claim 1 and 2, is characterized in that, described by the physical address map of described message place memory pages that obtains in the continuous free page list item of the shared page table of described receiving end, obtain the new virtual address of message, comprising:
Check the page table entry of the shared page table of described receiving end, obtain the continuous free page list item that can hold described message;
By the physical address map of the described message place memory pages of acquisition in the continuous free page list item of described shared page table, obtain the new virtual address of message.
6. method according to claim 1, is characterized in that,
Described first parameter comprises: the virtual address of described message and the length of described message, and the physical address of described message place memory pages obtains according to the virtual address of described message and the length of described message.
7. method according to claim 1 or 5, is characterized in that,
Described shared page table is the first shared page table; Wherein, described first shared page table is the page table for carrying out list of physical addresses mapping, and the first shared page table of described transmitting terminal and the first shared page table of described receiving end share Same Physical memory pages or the different physical memory page in described kernel spacing.
8. method according to claim 1 or 5, is characterized in that,
Described shared page table is the second shared page table; Wherein, described second shared page table is the page table for carrying out list of physical addresses mapping, and the second shared page table of described transmitting terminal and the second shared page table of described receiving end share Same Physical memory pages in described kernel spacing.
9. method according to claim 1 and 2, is characterized in that, described method also comprises:
The space of a page size is obtained as shared page table from memory headroom;
Described shared page table is mapped into described transmitting terminal and described receiving end page directory in, or, described shared page table is mapped into described receiving end page directory in.
10. a device for interprocess communication, is characterized in that, comprising:
Creating unit, for setting up the communication port communicated with receiving end;
Processing unit, for entering kernel spacing by system call, and by kernel spacing described in the channel number of described communication port and the first parameter read-in;
Acquiring unit, for the channel number according to described communication port, obtains the shared page table of described receiving end; Wherein, described shared page table is for mapping the page table of the physical address of described message place memory pages in the page table that described page directory is corresponding;
Described processing unit, also for the physical address map of described message place memory pages that will obtain in the continuous free page list item of the shared page table of described receiving end, obtain the new virtual address of message;
Storage unit, for by the new virtual address of described message and described first parameter stored in the message informing district of described receiving end, so that described receiving end reads described message informing district obtain the new virtual address of described message and described first parameter, and read the described message with corresponding length according to described new virtual address; Wherein, described message informing district distributes in described communication port process of establishing.
11. devices according to claim 10, is characterized in that, described first parameter comprises: ability is quoted, ability quotes skew, the length of described message page bias internal and described message,
Described acquiring unit, also quotes and quotes skew for obtaining ability corresponding to the internal memory that stores described message with ability.
12. devices according to claim 10, is characterized in that, described acquiring unit comprises:
First acquisition module, for the channel number according to described communication port, obtains the process control block (PCB) that described receiving end is corresponding;
Second acquisition module, for the page directory address according to the described receiving end in described process control block (PCB), obtains the first shared page table of described receiving end.
13. devices according to claim 12, is characterized in that, described first acquisition module specifically for:
According to the channel number of described communication port, obtain receiving end;
Relation mapping table between the process corresponding according to described receiving end and process control block (PCB), obtains the process control block (PCB) that described receiving end is corresponding; Wherein, the relation mapping table between the process that described receiving end is corresponding and process control block (PCB) is stored in advance in kernel spacing.
14. devices according to claim 10 or 11, it is characterized in that, described processing unit comprises:
Detection module, for checking the page table entry of the shared page table of described receiving end, obtains the continuous free page list item that can hold described message;
3rd acquisition module, for the physical address map of described message place memory pages that will obtain in the continuous free page list item of described shared page table, obtains the new virtual address of message.
15. devices according to claim 10, is characterized in that,
Described first parameter comprises: the virtual address of described message and the length of described message, and the physical address of described message place memory pages obtains according to the virtual address of described message and the length of described message.
16. devices according to claim 10 or 14, is characterized in that,
Described shared page table is the first shared page table; Wherein, described first shared page table is the page table for carrying out list of physical addresses mapping, and the first shared page table of described transmitting terminal and the first shared page table of described receiving end share Same Physical memory pages or the different physical memory page in described kernel spacing.
17. devices according to claim 10 or 14, is characterized in that,
Described shared page table is the second shared page table; Wherein, described second shared page table is the page table for carrying out list of physical addresses mapping, and the second shared page table of described transmitting terminal and the second shared page table of described receiving end share Same Physical memory pages in described kernel spacing.
18. devices according to claim 10 or 11, is characterized in that,
Described acquiring unit, also for obtaining the space of a page size as shared page table from internal memory;
Described processing unit, also for described shared page table is mapped in the page directory of described transmitting terminal and described receiving end, or, described shared page table is mapped into described receiving end page directory in.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310594639.2A CN104657224B (en) | 2013-11-21 | 2013-11-21 | A kind of method and apparatus of interprocess communication |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310594639.2A CN104657224B (en) | 2013-11-21 | 2013-11-21 | A kind of method and apparatus of interprocess communication |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104657224A true CN104657224A (en) | 2015-05-27 |
CN104657224B CN104657224B (en) | 2017-12-15 |
Family
ID=53248397
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310594639.2A Expired - Fee Related CN104657224B (en) | 2013-11-21 | 2013-11-21 | A kind of method and apparatus of interprocess communication |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104657224B (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106095694A (en) * | 2016-06-15 | 2016-11-09 | 华为技术有限公司 | Date storage method and device |
CN106557448A (en) * | 2015-09-24 | 2017-04-05 | 龙芯中科技术有限公司 | The kernel code read method of multi-node system and system |
CN107656826A (en) * | 2017-09-19 | 2018-02-02 | 光科技股份有限公司 | A kind of object-oriented power information acquisition terminal based on IPC Dynamic Maintenance technologies |
CN109086146A (en) * | 2018-07-26 | 2018-12-25 | 郑州云海信息技术有限公司 | A kind of relatively reliable inter-process communication methods based on Boost |
CN109669784A (en) * | 2017-10-13 | 2019-04-23 | 华为技术有限公司 | A kind of method and system of interprocess communication |
CN112131019A (en) * | 2020-09-17 | 2020-12-25 | 国网宁夏电力有限公司营销服务中心(国网宁夏电力有限公司计量中心) | Method for rapidly communicating processes of microkernel operating system |
CN113939805A (en) * | 2020-04-29 | 2022-01-14 | 华为技术有限公司 | Method and system for interprocess communication |
WO2022021896A1 (en) * | 2020-07-30 | 2022-02-03 | 华为技术有限公司 | Interprocess communication method and apparatus |
CN115934581A (en) * | 2023-03-08 | 2023-04-07 | 北京微步在线科技有限公司 | Cross-process memory processing method and system |
WO2024088194A1 (en) * | 2022-10-28 | 2024-05-02 | 华为技术有限公司 | Communication method and apparatus, and intelligent driving device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020062401A1 (en) * | 1998-06-16 | 2002-05-23 | Marc Alan Auslander | Technique for efficiently transferring moderate amounts of data across address space boundary |
CN101114272A (en) * | 2007-01-22 | 2008-01-30 | 北京中星微电子有限公司 | Chip capable of realizing communications between multiple cores in chip and method for communication |
CN101216814A (en) * | 2007-12-26 | 2008-07-09 | 杭州华三通信技术有限公司 | Communication method and system of multi-nuclear multi-operating system |
CN102244682A (en) * | 2011-07-19 | 2011-11-16 | 中国科学院软件研究所 | Covert communication method under cloud computing environment |
CN103077153A (en) * | 2013-02-01 | 2013-05-01 | 北京航空航天大学 | Inter-domain communication channel system of virtual machine based on authorized copy |
-
2013
- 2013-11-21 CN CN201310594639.2A patent/CN104657224B/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020062401A1 (en) * | 1998-06-16 | 2002-05-23 | Marc Alan Auslander | Technique for efficiently transferring moderate amounts of data across address space boundary |
CN101114272A (en) * | 2007-01-22 | 2008-01-30 | 北京中星微电子有限公司 | Chip capable of realizing communications between multiple cores in chip and method for communication |
CN101216814A (en) * | 2007-12-26 | 2008-07-09 | 杭州华三通信技术有限公司 | Communication method and system of multi-nuclear multi-operating system |
CN102244682A (en) * | 2011-07-19 | 2011-11-16 | 中国科学院软件研究所 | Covert communication method under cloud computing environment |
CN103077153A (en) * | 2013-02-01 | 2013-05-01 | 北京航空航天大学 | Inter-domain communication channel system of virtual machine based on authorized copy |
Non-Patent Citations (3)
Title |
---|
ANDREAS WEIGAND: "Generalized-Mapping IPC for L4", 《DIPLOMA THESIS, CHAIR FOR OPERATING SYSTEMS》 * |
刘福岩: "一种提高微内核效率的有效方法", 《上海交通大学学报》 * |
王宽卿: "微内核进程间通信的研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106557448A (en) * | 2015-09-24 | 2017-04-05 | 龙芯中科技术有限公司 | The kernel code read method of multi-node system and system |
CN106557448B (en) * | 2015-09-24 | 2019-06-18 | 龙芯中科技术有限公司 | The kernel code read method and system of multi-node system |
CN106095694A (en) * | 2016-06-15 | 2016-11-09 | 华为技术有限公司 | Date storage method and device |
CN107656826A (en) * | 2017-09-19 | 2018-02-02 | 光科技股份有限公司 | A kind of object-oriented power information acquisition terminal based on IPC Dynamic Maintenance technologies |
CN107656826B (en) * | 2017-09-19 | 2020-06-26 | 光一科技股份有限公司 | Object-oriented electricity consumption information acquisition terminal based on IPC dynamic maintenance technology |
US11892953B2 (en) | 2017-10-13 | 2024-02-06 | Huawei Technologies Co., Ltd. | Interprocess communication method and interprocess communications system |
CN109669784A (en) * | 2017-10-13 | 2019-04-23 | 华为技术有限公司 | A kind of method and system of interprocess communication |
CN109086146A (en) * | 2018-07-26 | 2018-12-25 | 郑州云海信息技术有限公司 | A kind of relatively reliable inter-process communication methods based on Boost |
CN113939805A (en) * | 2020-04-29 | 2022-01-14 | 华为技术有限公司 | Method and system for interprocess communication |
WO2022021896A1 (en) * | 2020-07-30 | 2022-02-03 | 华为技术有限公司 | Interprocess communication method and apparatus |
CN112131019A (en) * | 2020-09-17 | 2020-12-25 | 国网宁夏电力有限公司营销服务中心(国网宁夏电力有限公司计量中心) | Method for rapidly communicating processes of microkernel operating system |
WO2024088194A1 (en) * | 2022-10-28 | 2024-05-02 | 华为技术有限公司 | Communication method and apparatus, and intelligent driving device |
CN115934581A (en) * | 2023-03-08 | 2023-04-07 | 北京微步在线科技有限公司 | Cross-process memory processing method and system |
CN115934581B (en) * | 2023-03-08 | 2023-05-05 | 北京微步在线科技有限公司 | Method and system for processing cross-process memory |
Also Published As
Publication number | Publication date |
---|---|
CN104657224B (en) | 2017-12-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104657224A (en) | Inter-process communication method and device | |
US8381230B2 (en) | Message passing with queues and channels | |
CN108572818A (en) | A kind of user interface rendering intent and device | |
WO2014206289A1 (en) | Method and apparatus for outputting log information | |
CN105335309B (en) | A kind of data transmission method and computer | |
CN104216862A (en) | Method and device for communication between user process and system service | |
CN111190854B (en) | Communication data processing method, device, equipment, system and storage medium | |
US10645051B2 (en) | Memory-mapped input/output (I/O) channel | |
CN104794194A (en) | Distributed heterogeneous parallel computing system facing large-scale multimedia retrieval | |
US10048886B2 (en) | Method and system providing file system for an electronic device comprising a composite memory device | |
US9588923B2 (en) | Flow pinning in a server on a chip | |
US20060200802A1 (en) | Systems, methods and architecture for facilitating software access to acceleration technology | |
CN111431757A (en) | Virtual network flow acquisition method and device | |
KR20190015518A (en) | Data processing method and apparatus | |
US20190187897A1 (en) | Efficient sharing of non-volatile memory | |
CN111897660A (en) | Model deployment method, model deployment device and terminal equipment | |
WO2021258512A1 (en) | Data aggregation processing apparatus and method, and storage medium | |
US8543722B2 (en) | Message passing with queues and channels | |
CN116932421A (en) | A data storage method, device, equipment and storage medium | |
US10177795B1 (en) | Cache index mapping | |
CN111949371A (en) | A command information transmission method, system, device and readable storage medium | |
CN109144853B (en) | A software-defined radio SoC chip debugging system | |
US20200026669A1 (en) | Memory system | |
CN117348851A (en) | Interface dynamic generation method, device, equipment and storage medium thereof | |
CN116610354A (en) | Parameter verification method, device, computer equipment and storage medium |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20171215 |