Menu
  • HOME
  • TAGS

Are cache-line-ping-pong and false sharing the same?

caching,multicore,computer-architecture,processor,false-sharing

Summary: False sharing and cache-line ping-ponging are related but not the same thing. False sharing can cause cache-line ping-ponging, but it is not the only possible cause since cache-line ping-ponging can also be caused by true sharing. Details: False sharing False sharing occurs when different threads have data that is...

Does false sharing also occur when threads only write to the same cache block?

multithreading,parallel-processing,multiprocessing,false-sharing

Yes, it also happens then. In order to write to a subset of bytes in a cache line that line must first be read, then modified, then written back. A logical write is usually a physical read-write. CPUs could do this differently but I'm not aware of any CPU that...