Open main menu

CDOT Wiki β

Changes

DPS921/Group 8

6 bytes added, 11:53, 26 November 2018
Critical construct
[[File:4threads_padding.jpg|1000px]]
== '''Critical construct ''' ==
The other way to eliminating false sharing is to implement a mutual exclusion construct. This the better method than using padding as there is no wasting of memory and data access is not hindered due to cache line invalidation. Programming a mutual exclusion implementation is done by using the critical construct in an op environment. The critical construct restricts statements to a single thread to process at a time, making variables local to a single thread ensures that multiple threads do not write data to the same cache line.
42
edits