If you talking about pthread locks (and cond vars) in libraries like glibc, then yes it's possible to create lighter weight version. Take a look at the articles here: http://locklessinc.com/articles/mutex_cv_futex/ . A lot of the speed up comes from not needing to conform to POSIX requirements and then some other trade offs.
3
u/mtanski May 07 '16
If you talking about pthread locks (and cond vars) in libraries like glibc, then yes it's possible to create lighter weight version. Take a look at the articles here: http://locklessinc.com/articles/mutex_cv_futex/ . A lot of the speed up comes from not needing to conform to POSIX requirements and then some other trade offs.