Dining philosophers in C++11: Chandy-Misra algorithm

In my previous post, Dining Philosophers in C++11, I have provided an implementation for the dining philosophers problem using modern C++ features, such as threads and mutexes. However, it was noted in the comments that the implementation did not prevent the philosophers starving to death when you remove the waiting times. An algorithm that prevents…

Dining Philosophers in C++11

UPDATE: for an implementation of the Chandy/Misra solution see Dining philosophers in C++11: Chandy-Misra algorithm The problem of the dining philosophers, first proposed by Edsger Dijkstra and reformulated by Tony Hoare, is a famous problem for concurrent programming that illustrates problems with synchronizing access to data. The description of the problem, taken from Wikipedia, is…

Windows 7 Quotes Problem

For several months, after I installed Windows 7 at home I had a very annoying problem: whenever I was writing double quotes (“) or single quotes (‘) in some text editors and all browsers, the quotes did not appear. Only after I was typing another character, then both the opening and the closing quotes were…