Unlock instant, AI-driven research and patent intelligence for your innovation.

IPC communication method and server

A communication method and notification signal technology, applied in the directions of instruments, inter-program communication, program synchronization, etc., can solve problems such as unresolved, untimely server response, and complexity, and achieve the effects of reducing processing, reducing energy consumption, and improving response speed.

Inactive Publication Date: 2017-08-22
深圳慧昱教育科技有限公司
View PDF5 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

There are many IPC communication methods, but generally it is point-to-point communication between two processes. Usually, in order to make full use of the concurrency capability of the server, the same processing function will be assigned multiple independent processes to complete, and through the implementation of a certain mechanism. Complete the assignment of processing tasks to each independent process, which belongs to one-to-many / many-to-many communication methods, and the implementation of this type of communication method needs to fully consider the security of reading and writing and the appropriate receiver's perception of the arrival of new messages , which is much more complicated than point-to-point communication. There are problems that the processing capacity of the server cannot be fully utilized when it is busy, and the server does not respond in time when it is idle.
[0003] For the problem of untimely response in idle time in the above-mentioned IPC communication method, no effective solution has been proposed so far

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • IPC communication method and server
  • IPC communication method and server
  • IPC communication method and server

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0033] figure 1 It is a schematic flow chart of an IPC communication method of the present invention. The method is applied to the receiving side, and the receiving side includes: monitoring the parent process, monitoring a plurality of mutually independent message processing child processes and shared memory created by the monitoring parent process; the shared memory is used to store notification signal marks and messages written by the sender; the The method flow shown in the embodiment includes the following steps:

[0034] Step S11, the message processing sub-process accesses the shared memory.

[0035]The receiving side includes a plurality of message processing sub-processes, and the above-mentioned sub-processes may be sub-processes that have ended dormancy or may be sub-processes awakened by a monitoring parent program. Specifically, the message processing sub-process accesses the shared memory by reading unprocessed messages in the shared memory.

[0036] Step S12,...

Embodiment 2

[0050] figure 2 It is a schematic flow chart of a kind of IPC communication method of the present invention, on the basis of embodiment 1, also includes the step under the situation that there are more than two unprocessed messages in the shared memory, when the message processing sub-process judges how many messages there are in the shared memory When there are two unprocessed messages, the specific steps are as follows:

[0051] Step S21, setting the status of the notification signal flag as invalid, and reading and processing unprocessed messages.

[0052] The above notification signal is marked as invalid so that the sender does not send a new message notification signal to the receiver when a new message is written into the shared memory.

[0053] When there are more than two unprocessed messages in the shared memory, that is, when it is busy, there are still pending messages in the queue after a subprocess processes a pending message, and the message processing subproc...

Embodiment 3

[0058] image 3 It is a schematic flow diagram of an IPC communication method of the present invention, and the method flow shown in this embodiment includes the following steps:

[0059] Step S31, write the message into the shared memory of the receiver.

[0060] The operation of sending data from the sender to the receiver is realized by writing data to the shared memory of the receiver. After the data is written, it is necessary to determine whether to send a notification signal to the receiver according to the notification signal value set by the receiver in the shared memory.

[0061] Specifically include: obtaining the write operation lock of the message queue on the shared memory; judging whether the message queue is full; when the message queue is not full, writing a message in the area pointed to by the read pointer of the current queue, and then releasing the write operation lock; When it is full, continue to execute the step of judging whether the message queue is ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides an IPC communication method and a server, and relates to the technical field of computer communication. The IPC communication method comprises the following steps of: accessing to a shared memory by a message processing sub-process; judging the quantity of unprocessed messages in the shared memory by the message processing sub-process; when no unprocessed messages exist in the shared memory, setting the state of a notification signal mark to be effective and entering a dormant state, wherein effective state of the notification signal mark is used for sending a new message notification signal to a receiver when a transmitter is triggered to write a new message in the share memory; when only one unprocessed message exists in the share memory, setting the state of the notification signal mark to be effective and reading and processing the unprocessed message; and when the receiver receives the new message notification signal, awakening at least one sub-process in a plurality of message processing sub-processes. According to the method, the shared memory and the notification signal mark are set at the receiver, so as to improve the response speed of the receiver in idle hours and reduce the energy consumption of the server.

Description

technical field [0001] The invention relates to the technical field of computer communication, in particular to an IPC communication method and server. Background technique [0002] In a multi-process server architecture, the layered design method of access layer-functional layer is usually adopted, and these different layers or different processes in the same layer need to communicate with each other, which involves the intra-machine communication method ( IPC, Inter-Process Communication, inter-process communication) design. There are many IPC communication methods, but generally it is point-to-point communication between two processes. Usually, in order to make full use of the concurrency capability of the server, the same processing function will be assigned multiple independent processes to complete, and through the implementation of a certain mechanism. Complete the assignment of processing tasks to individual processes, which belongs to one-to-many / many-to-many commu...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/54G06F9/52
CPCG06F9/526G06F9/544G06F9/546G06F2209/548
Inventor 丁少鸿列振毅
Owner 深圳慧昱教育科技有限公司