diff --git a/answers/02/false_sharing.svg b/answers/02/false_sharing.svg new file mode 100644 index 0000000..b989a12 --- /dev/null +++ b/answers/02/false_sharing.svg @@ -0,0 +1,422 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + thread 2 + + + + + thread 1 + + + + + + thread 1 + + + + cache line + cache + + + 1 + 3 + + + + + 2 + 3 + + + + 1 + 4 + + + if one thread changes its variable, the other has to reload the entire cache line before changing their variable + + + + thread 2 + + + + +