lundi 6 juillet 2020

Where is the downside if the mutex and the data items are close together in memory?

In 《c++ concurrency in action》page 265,

enter image description here

The data in the same cache-line with mutex-locks will be propagated because the mutex-locks are implemented as a r-m-w atomic operation. So the downside of this situation is the cost of ‘call to the operating system kernel’?

Aucun commentaire:

Enregistrer un commentaire