Why is a pthread mutex considered “slower” than a futex?
Futexes were created to improve the performance of pthread mutexes. NPTL uses futexes, LinuxThreads predated futexes, which I think is where the “slower” consideration comes. NPTL mutexes may have some additional overhead, but it shouldn’t be much. Edit: The actual overhead basically consists on: selecting the correct algorithm for the mutex type (normal, recursive, adaptive, … Read more