sequential consistency

My Conclusion: Summation of a Vector in three Variants

After I've calculated in three different ways the sum of a std::vector I want to draw my conclusions.

Read more
Comments 2Views: 2055

Multithreaded: Summation with Minimal Synchronization

Until now I've used two strategies for the summation of a std::vector. First I did the whole math in one thread (Single Threaded: Summation of a vector); second multiple threads shared the same variable for the result (Multithreaded: Summation of a vector). In particular the second strategy was extremely naive. In this post I will apply my knowledge of both posts. My goal is it that the thread will perform their summation as independent form each other as possible and therefore reduce the synchronization overhead. 

Read more
Comments 4Views: 1315

Thread-Safe Initialization of a Singleton

There are a lot of issues with the singleton pattern. I'm totally aware of that. But the singleton pattern is an ideal use case for a variable, which has only to be initialized in a thread safe way. From that point on you can use it without synchronization. So in this post I discuss different ways to initialize a singleton in a multithreading environment. You get the performance numbers and can reason about your uses cases for the thread safe initialization of a variable.

Read more
Comments 6Views: 5615

Ongoing Optimization: Sequential Consistency with CppMem

With atomic data types you can tailor your program to your needs and therefore optimize it. But now we are in the domain of the multithreading experts.

Read more
Comments 4Views: 1735

Fences are Memory Barriers

The key idea of a std::atomic_thread_fence is, to establish synchronisation and ordering constraints between threads without an atomic operation.

Read more
Comments 8Views: 4004

Acquire-Release Semantic

With the acquire-release semantic the memory model gets very thrilling. Because now, we have not to reason about the synchronisation of threads, now we have to reason about the synchronisation of the same atomic in different threads.

Read more
Comments 3Views: 2183

Sequential Consistency applied

I have introduced In the post Sequential Consistency the default memory model. This model, in which all operations in all threads takes place in a global time clock, has a big advantage but also a big disadvantage.

Read more
Comments 2Views: 2249

My Newest E-Book

Latest comments

Subscribe to the newsletter (+ pdf bundle)

Blog archive

Source Code

Visitors

Today 221

All 257841

Currently are 196 guests and no members online