I have been reading random links on non-blocking algorithms and uses thereof in concurrent programming. Are there any useful libraries using non-blocking algorithms with C/C++ and what types of concurrent data structures that benefit the most from the use of non-blocking algorithm? Thanks.
I have been reading random links on non-blocking algorithms and uses thereof in concurrent
Share
boost::threaduses compare-and-swap semantics for shared_mutex on Windows – only if contention occurs is a blocking call made (using semaphores).Windows itself supports use of a spin count on Critical Sections via InitializeCriticalSectionAndSpinCount to attempt to optimize a bit for high-contention locks on MP systems.
Microsoft really got the religion on threading performance and both managed and native code now have slimline reader-writer locks.
This also gives me another opportunity to plug a book I’ve been waiting for, since it has a chapter on this topic : C++ Concurrency in Action.