I am trying to develop a way to synchronize two processes sharing data.
Basically, I have two processes related to using shared memory. I need process A to set some data in the shared memory area, and then process B to read that data and act on it.
The sequence of events I am looking for is:
- B blocks the expected data access.
- A writes data
- Available Signal Data Available
- B reads data
- B blocks the pending data access signal
- Signal data not available
- Everything goes back to the beginning.
In other words, B is blocked until it receives the signal โ1โ, receives data, and then blocks again until this signal goes to โ0โ.
, , while, 100% , while , .
, , , . , - .
, , , .
, - , . , .
, ?