Atomic Concurrent Queue (Circular-buffer) | UNIX IPC
all details and benchmark in the PDF file : Rapport Projet System M1.pdf
a popular exemple of POSIX IPC is -> mqueue.h
Vectored read,write
Compliant operations (try to read or write as far as ask by user while respecting atomic limit and blocking mode)
- The define MODE_MEMCPY at TRUE use the memcpy function from standard C library else it don't
- It use ATOMIC OPERATIONS
- There is 2 implementation possible :
MPMC -> multiple producer multiple consumer solutions
SPSC -> single producer single consumer solutions
make
without argument , compile the test FILES with the not concurrent implementation of conducts
make conc
with argument "conc" , compile the test FILES with the concurrent implementation of conducts
#define MODE_FILE 1 named file mode
#define MODE_BLOCK 1 mode blocking
threads ORDER write in Conduct 1 || threads WORKER read in Conduct 1 and after write in conduct 2 || threads RESULT read Conduct 2
#define QSIZE 100 the number of oder per threads
#define MODE_COND 1 mode conduct is activate , others are not
#define MODE_PIPE 0
#define MODE_SOCKET 0
- Robust Mutex
- Signals corectness
strace -c -f ./julia
time ./julia
more details in the PDF file