The Programming Works – Suppose we have an algorithm that uses N parallel threads, and we have a system with M CPU cores, N > M. Running the algorithm on the system leads to performance loss because the threads are contend for available CPU cores and cause time-consuming thread context switching. A better approach is to execute threads sequentially on the available CPU cores, to avoid the unnecessary thread context switching. There is a simple technique called semaphore throttle which limits the number of active, contending threads. It is interesting to estimate how efficient semaphore throttle is on real system. ...
Visits by Source
Users who voted for this posting
Jørn E. Angeltveit