随笔分类 - Multi-Thread
摘要:http://www.parallellabs.com/2010/01/31/pthreads-programming-spin-lock-vs-mutex-performance-analysis/POSIX threads(简称Pthreads)是在多核平台上进行并行编程的一套常用的API。线程同步(Thread Synchronization)是并行编程中非常重要的通讯手段,其中最典型的应...
阅读全文
摘要:On Mac OS X and Windows there are builtin CompareAndSwap functions you should be using anyway (InterlockedCompareExchange() and OSAtomicCompareAndSwapPtrBarrier() respectively). Thus will work rega...
阅读全文
摘要:SpinLock might be useful when a lock on a shared resource is not going to be held for very long. In such cases, on multi-core computers it can be efficient for the blocked thread to spin for a few cyc...
阅读全文
摘要:http://www.cs.rochester.edu/research/synchronization/pseudocode/queues.html/Files/slime/1996_PODC_queues.pdfPseudocode from article of the above name in PODC96 (with two typos corrected), by Maged M. ...
阅读全文
摘要:Shared-memory blocks are perhaps the fastest IPC mechanism, especially for transferring large structures between processes. However, they require careful synchronization, or subtle bugs can occur i...
阅读全文

浙公网安备 33010602011771号