3 ms·
>"The typical scheme for using it looks almost exactly like a well known trick for speeding up conventional mutual exclusion features that have low contention,
by bogomipz 6y ago
>"The typical scheme for using it looks almost exactly like a well known trick for speeding up conventional mutual exclusion features that have low contention, which you'd see in say BeOS as the Benaphore, or described in several books about high performance programming."
Do you have any links that document this trick in Linux? Is there name for it or search term I could use to find out more?
- tialaramex 6y agoThe phrase you'd have used to describe this when it wasn't just how everything works on a good OS is "Lightweight mutex". Here's Be explaining the "Benaphore" for example: https://www.haiku-os.org/legacy-docs/benewsletter/Issue1-26.html https://www.haiku-os.org/legacy-docs/benewsletter/Issue1-26.... Note that when I say "typical scheme for using it" I did not mean, that your program should implement such a scheme itself, instead futex is intended for the sort of people who implement the concurrency features in your language or APIs to use - and this is how they'd go about doing that to deliver the features you just use. So, for most of us this is interesting to know about but unlikely to impact our day-to-day practice.