Top "Lock-free" questions

An umbrella term for methods and algorithms to synchronize multithreaded environments or other forms of distributed system without using locks.

Is it possible to implement lock free map in C++

We are developing a network application based C/S, we find there are too many locks adding to std::map …

c++ algorithm dictionary lock-free
C code of lock-free queue

How could I implement this lock-free queue pseudocode in C? ENQUEUE(x) q ← new record q^.value ← x q^.next ← …

c queue lock-free
Lock Free Queue -- Single Producer, Multiple Consumers

I am looking for a method to implement lock-free queue data structure that supports single producer, and multiple consumers. I …

c++ queue atomic lock-free
Is x86 CMPXCHG atomic, if so why does it need LOCK?

The Intel documentation says This instruction can be used with a LOCK prefix to allow the instruction to be executed …

concurrency x86 atomicity lock-free compare-and-swap
Shared-memory IPC synchronization (lock-free)

Consider the following scenario: Requirements: Intel x64 Server (multiple CPU-sockets => NUMA) Ubuntu 12, GCC 4.6 Two processes sharing large amounts of …

c++ synchronization ipc shared-memory lock-free
Looking for the right ring buffer implementation in C

I am looking for a ring buffer implementation (or pseudocode) in C with the following characteristics: multiple producer single consumer …

c multithreading producer-consumer lock-free circular-buffer
Lock-free swap of two unique_ptr<T>

Swapping two unique_ptrs is not guaranteed to be threadsafe. std::unique_ptr<T> a, b; std::swap(…

c++ c++11 unique-ptr lock-free atomic-swap
Memory barriers in userspace? (Linux, x86-64)

It is easy to set memory barriers on the kernel side: the macros mb, wmb, rmb, etc. are always in …

c++ c multithreading lock-free memory-barriers
How to implement lock-free skip list

I need to implement a lock-free skip list. I tried to look for papers. Unfortunatly all I found was lock-free …

algorithm lock-free skip-lists
Do lock-free algorithms really perform better than their lock-full counterparts?

Raymond Chen has been doing a huge series on lockfree algorithms. Beyond the simple cases of the InterlockedXxx functions, it …

multithreading synchronization lock-free