Inter-process communication method and device and Linux equipment
An inter-process communication and process technology, which is applied in inter-program communication, multi-programming device, program control design, etc., can solve the problems affecting the operation efficiency of Linux devices, affecting the progress of the process, etc., so as to facilitate unified management and improve operation efficiency. , the effect of improving transmission efficiency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Example
[0025][First Embodiment]
[0026]Such asfigure 1 As shown, the first embodiment of the present invention provides an inter-process communication method, which is suitable for Linux devices, which includes, for example, the following steps:
[0027]S11, the process ID is acquired after the target process is started;
[0028]S13, the target process creates a socket based on the acquired process ID, and binds the socket to the target configuration file;
[0029]S15. The target process parses the target configuration file to obtain the process ID of the session target process contained in the target configuration file, and creates a session structure corresponding to the process ID of the session target process, wherein the session The structure includes the process ID of the session target process, and a socket descriptor that associates the socket of the target process with the socket of the session target process; and
[0030]S17, data sending or data receiving, for example, when the target process...
Example
[0041][Second embodiment]
[0042]Such asimage 3 As shown, the inter-process communication device 30 provided by the second embodiment of the present invention is suitable for Linux devices and includes: a process ID acquisition module 31, a creation and binding module 33, an analysis and creation module 35, and a data transceiver module 37.
[0043]Wherein, the process ID acquisition module 31 is for example used for acquiring the process ID after the target process is started; the creation and binding module 33 is for example used for the target process to create a socket based on the acquired process ID, and make the socket The socket is bound to the target configuration file; the parsing and creation module 35 is used, for example, for the target process to parse the target configuration file to obtain the process ID of the session object process contained in the target configuration file, and to create the session The session structure corresponding to the process ID of the target pr...
Example
[0049][Third embodiment]
[0050]Such asFigure 5 As shown, the third embodiment of the present invention provides a Linux device 50, which includes a processor 51 and a memory 52; wherein the memory 52 stores instructions executed by the processor 51, and the instructions cause the processor 51 to perform operations such as The inter-process communication method described in the first embodiment.
[0051]The Linux device provided by the third embodiment of the present invention can also have the following technical effects similar to the foregoing first embodiment: 1) By assigning a process ID to a process and configuring a specific configuration file, it clarifies the communication object of each process, thereby Avoid the interference of other irrelevant processes; 2) Each process uses local sockets to communicate with each other, which is convenient for unified management of all related processes; 3) The data packet adopts the combination of data header and data area, and it is well wr...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap