Content from 2015-02

When writing software, I have always assumed that I could have trust in the underlying platform. At least to some basic extent. For instance, when writing a multi-threaded program running on Linux, it is not unreasonable to think that the POSIX thread synchronization mechanisms are actually, you know, thread-safe. As it turns out, it's not quite true. We have learnt about this fact in a rather painful way - having a heavily-loaded production system crash every now and then. I ended up having to implement my own semaphores.