Microbenchmark showing process-switching faster than thread-switching; what's wrong?

Simple: pthread_mutex_lock() takes around about 2ms on your system, and your threads version takes two locks each time through the loop, whereas the processes version takes only one lock.

Historically Unix (and Linux as it derivative) had relatively cheap fork() so process creating wasn't an issue and concurrent processesing was (and still mostly is) done using multiple processes.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions