Coder Social home page Coder Social logo

concurrent-queue-ipc-unix's Introduction

IPC -> INTER-PROCESSUS COMMUNICATIONS

all details and benchmark in the PDF file : Rapport Projet System M1.pdf

a popular exemple of POSIX IPC is -> mqueue.h

ATOMIC CIRCULAR-BUFFER Message queue IMPLEMENTATIONS (UNIX)

  • Custom Atomic Guaranteed limit

  • Thread Safe ( Multiprocessing or Multithreading)

  • Blocking read,write,write_eof

  • Non Blocking read,write,write_eof

  • Vectored read,write

  • Compliant operations (try to read or write as far as ask by user while respecting atomic limit and blocking mode)

  • Message queue can be anonymous or maped in a file

  • Code Correctness (All systemCall and Mutex Operations return values are tested)

IMPLEMENTATIONS

1 ) conduct.c is not concurrent and not lock-free

- The define MODE_MEMCPY at TRUE use the memcpy function from standard C library  else it don't

2) concurrentconduct.c is concurrent and not lock-free (Writer and Reader can use at the same time the Circular-Buffer)

- It use ATOMIC OPERATIONS
- There is 2 implementation possible :

	MPMC ->  multiple producer multiple consumer solutions
	SPSC ->  single producer single consumer solutions

COMPILATION

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

TEST FILES

- julia

#define MODE_FILE 1		named file mode
#define MODE_BLOCK 1	mode blocking

- test_3thread_depedency launch 3 type of threads with 2 shared conduct

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

- test_vectored_IO

- test_simple

POSSIBLE IMPROVEMENT

- Robust Mutex
- Signals corectness

strace -c -f ./julia time ./julia

Benchmark

more details in the PDF file

alt text

concurrent-queue-ipc-unix's People

Contributors

raphaelauv avatar

Stargazers

 avatar

Watchers

 avatar  avatar

concurrent-queue-ipc-unix's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.