Shared memory based data access method and device
A shared memory and data access technology, applied in the field of data processing, can solve the problems of high usage frequency, system crash, and high real-time requirements, and achieve the effects of improving stability, improving real-time performance, and improving access speed.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0052] figure 1 It is a flow chart of the shared memory-based data access method provided by Embodiment 1 of the present invention.
[0053] A data access method based on shared memory, comprising:
[0054] The first processor applies for a first data buffer from a preset shared memory area, so that the first processor sends data to the second processor;
[0055] The first processor saves the data to be sent in the first data buffer, and sends an interrupt instruction to the second processor;
[0056] After the second processor receives the interrupt instruction, it judges whether there is data to be read in the first data buffer, if so, reads the data to be read, if not, does not perform read operation.
[0057] Such as figure 2 As shown, in this embodiment, the shared memory area further includes a second data buffer, and the second data buffer is used to store data sent by the second processor to the first processor.
[0058] In this embodiment, if the second processor ...
Embodiment 2
[0077] Such as Figure 5 As shown, it is a schematic structural diagram of a data access device based on shared memory provided by Embodiment 2 of the present invention.
[0078] A data access device based on shared memory, comprising:
[0079] The application unit is used for the first processor to apply for the first data buffer to the preset shared memory area, so that the first processor sends data to the second processor;
[0080] a storage unit, configured for the first processor to store the data to be sent in the first data buffer, and send an interrupt instruction to the second processor;
[0081] The reading unit is used for the second processor to judge whether there is data to be read in the first data buffer after receiving the interrupt instruction, and if so, read the data to be read.
[0082] In this embodiment, the first data buffer includes a read data pointer area, a write data pointer area, a data initial storage area, a reserved area, a valid data area, ...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 