Implementation and analysis of locking and lock free concurrent queues using C++. The lock-free implementation follows the algorithm descrided in this paper.
cd concurrent_queue
make all
./main -1
-
On default number of cores but decide number of threads:
./main <numThreads>
, where numThreads = [1,12] -
Decide number of cores:
taskset --cpu-list 0 - <numCores + 1> ./main numCores
, where numCores = [1,12]. -
The reason for numCores + 1 is that the main thread uses a core
-
see
man taskset
on linux