Shared-Memory Interprocess Data Transfer via Bitmap Polling
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing inter-process data transmission methods suffer from low efficiency and high latency due to the use of system calls for notification and response messages in shared memory communication.
Innovation Solution
An inter-process data transmission method that utilizes a data stream identifier to write target data into a shared memory and a bitmap field, followed by busy-wait polling detection to acquire data without system calls, improving efficiency and reducing latency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If system calls are used for notification and response messages in shared memory communication, then data transmission can be implemented between processes, but data transmission efficiency is low and latency is high
Solution Approach 1:
The patent extracts and removes the system call mechanism from the data transmission process. By using shared memory with bitmap fields and busy-wait polling, the solution eliminates the need for system calls for notification and response messages, thereby avoiding the overhead and latency associated with system calls while maintaining inter-process communication functionality
Solution Approach 2:
The patent implements a self-service mechanism where the receiving process actively polls the bitmap field to detect data availability and automatically acquires data when ready. This eliminates the need for the sending process to notify the receiving process through system calls, allowing the system to self-manage the communication protocol without external intervention or system call overhead
2Reliability
If system calls are used for inter-process communication notification, then data can be transmitted between processes, but resource overhead is increased
Solution Approach 1:
The patent removes system calls from the communication protocol by implementing a pure shared memory-based mechanism with bitmap fields for status indication. This extraction eliminates the resource overhead of system calls while maintaining reliable data transmission through the busy-wait polling mechanism that continuously checks the bitmap field for data availability
Data Source
AI summary
The disclosure provides an inter-process data transmission method. After a local inter-process communication connection is created for a first program process and a second program process, a data stream identifier is obtained through the first program process. Target data is written into a data buffer of a shared memory through the first program process, and a first read/write status value is written into a target location of a first bitmap field of the shared memory based on the data stream identifier after the target data is written, where the target location is determined based on the data stream identifier. Busy-wait polling detection is performed on the first bitmap field of the shared memory through the second program process. If the first read/write status value is detected at the target location of the first bitmap field, the target data output by the first program process is acquired from the data buffer.


