Questions tagged [wait-free]

A method is wait-free if it guarantees that every call finishes its execution in a finite number of steps (i. e. even if one thread is stuck on execution, other threads don't wait while it completes).

1
vote
0answers
32 views

Why wait-free multi-producer queue in Boost atomic example is wait-free

I have a question about the wait-free multi-producer queue in boost atomic example. I think the 'push' is only lock-free rather than wait-free, because there is a 'compare_exchange_weak loop', then ...
2
votes
1answer
375 views

Ring buffer for a wait-free producer and a blocking consumer

I have a producer thread that produces objects at a rate that might (temporarily) be too fast for the consumer thread to consume. Therefore, I'd like a FIFO that buffers the remaining work. Once the ...
1
vote
2answers
180 views

memory ordering in boost example of lock-free ring buffer

When I read boost atomics about an example wait-free ring buffer implementation: https://www.boost.org/doc/libs/1_66_0/doc/html/atomic/usage_examples.html#boost_atomic.usage_examples....
0
votes
1answer
22 views

Can the hardware fetch&add instruction guarantee wait-free execution?

So, if multiple processes execute FAA, is there any guarantee that this FAA instruction will be executed in a wait-free manner? What if processes that finish executing this instruction do not stop ...
1
vote
0answers
188 views

Is the following object wait-free?

Here is the full question: Is the following property equivalent to saying that object x is wait-free? For every infinite history H of x, every thread that takes an infinite number of steps in H ...
0
votes
1answer
94 views

How to check what progress guarantee a concurrent program follows?

I was working on some concurrent programs for the past few weeks and was wondering if there is any tool that can automatically detect what type of progress condition its operations guarantees, that is ...
6
votes
1answer
865 views

implementing a Fast .NET Lock-Free Inter-Process using SharedMemory MMF

I am new to multitasking and IPC and I am trying to construct an approach for fast inter process comunication using shared memory( at first I was researching the IPC term, having in mind wcf sockets ...
0
votes
2answers
365 views

Wait-free queue implementation in JAVA

I've been trying to use already written Wait-free queue by Alex Kogan and Erez Petrank taken from here, but faced the problem. I can't understand that exactly thread ID need to be used in que() and ...
27
votes
5answers
3k views

Lock-free and wait-free thread-safe lazy initialization

To perform lock-free and wait-free lazy initialization I do the following: private AtomicReference<Foo> instance = new AtomicReference<>(null); public Foo getInstance() { Foo foo = ...