Dining Philosophers Problem III

This post ends the mini-series about the dining philosophers problem by Andre Adrian. Today, he applies powerful locks and semaphores.

Read more
Views: 8180

Dining Philosophers Problem II

In the last post "Dining Philosophers Problem I", Andre Adrian started his analysis of the classical dining philosophers' problem. Today, he uses atomics, mutexes, and locks.

Read more
Views: 5789

Dining Philosophers Problem I

At Christmas time, I had a few nice discussions with Andre Adrian. He solved the classical dining philosopher's problem in various ways using modern C++. I convinced him to write an article about this classic synchronization issue, and I'm happy to publish it in three consecutive posts.

Read more
Views: 19903

A new Thread with C++20: std::jthread

One of the participants in my CppCon 2018 workshop asked me: "Can a std::thread be interrupted?". No, that was my answer, but this is not correct anymore. With C++20, we might get a std::jthread.

Read more
Tags: jthread
Views: 251467

The End of my Detour: Unified Futures

After the last post to executors, I can finally write about the unified futures. I write in the post about the long past of the futures and end my detour from the C++ core guidelines.

Read more
Views: 24026

A Short Detour: Executors

A few weeks ago, one of the authors of the proposal to the futures in C++ Felix Petriconi wrote me an E-Mail. He said my article about std::future Extensions is quite dated. Honestly, he is right. The future of the futures changed mainly because of the executors.

Read more
Views: 61935

ABA - A is not the same as A

A common problem in concurrency is the so-called ABA problem. That means you read a value twice and each time it returns the same value A. Therefore you conclude that nothing changed in between. But you forgot the B.

Read more
Tags: Atomics
Views: 29904

Blocking and Non-Blocking Algorithms

Blocking, non-blocking, lock-free, and wait-free. Each of these terms describes a key characteristic of an algorithm when executed in a concurrent environment. So, reasoning about the runtime behavior of your program often means putting your algorithm in the right bucket. Therefore, this post is about buckets.

Read more
Views: 68420

Malicious Race Conditions and Data Races

This post is about malicious race conditions and data races. Malicious race conditions are race conditions that cause the breaking of invariants, blocking issues of threads, or lifetime issues of variables.

Read more
Views: 22117

Race Conditions versus Data Races

Race conditions and data races are related but different concepts. Because they are related, they are often confused. In German, we even translate both expressions with the term kritischer Wettlauf. That is very bad. To reason about concurrency, your wording must be exact. Therefore, this post is about race conditions and data races.

Read more
Views: 86720

Stay Informed about my Mentoring

 

Mentoring

English Books

Course: Modern C++ Concurrency in Practice

Course: C++ Standard Library including C++14 & C++17

Course: Embedded Programming with Modern C++

Course: Generic Programming (Templates)

Course: C++ Fundamentals for Professionals

Course: The All-in-One Guide to C++20

Course: Master Software Design Patterns and Architecture in C++

Subscribe to the newsletter (+ pdf bundle)

All tags

Blog archive

Source Code

Visitors

Today 3748

Yesterday 4371

Week 39555

Month 169680

All 12057446

Currently are 172 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments