A
A
aethylic2016-02-27 22:42:29
linux
aethylic, 2016-02-27 22:42:29

What are the possible pitfalls in implementing a lock-free data container in linux shared memory in C?

For a multi-threaded and simultaneously multi-process server application written in pure C under Linux, it is required to implement non-blocking access to a hash table or skip-list type data structure common for all processes and threads with an int type key and a pointer type value so that the data container itself and the data itself was in shared memory allocated via mmap or shm_open. Are there any pitfalls in working with shared memory that make this scheme not work? to work with the container and data will use atomic operations like CAS built into gcc.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
werw, 2016-02-28
@werw

Have you read a series of articles about lock-free?
Maybe there is already a ready answer?
https://habrahabr.ru/users/khizmax/topics/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question