Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Modern processors use something like https://en.m.wikipedia.org/wiki/MOESI_protocol to share data between processors.

So basically, writing a shared line is expensive. Atomic reads are free, as are atomic writes to a cache line that no one else is using.



It's never truly free but on some CPUs (e.g. x86 and x86-64) you're always paying for it anyway and so you might as well use it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: