# False sharing

Notes:

* most modern processors not only cache the requested value but also cache a few more nearby values.&#x20;
  * processor caches are working in terms of cache lines, instead of single cacheable values.
* When multiple processors are operating on the same or nearby memory locations, they may end up sharing the same cache line.
*

![](https://415484505-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LxtoAXZwwOc4XGto8vb%2Fuploads%2FQQ7Q3hRaAo1PhUW0XLPd%2FScreenshot%202022-03-11%20at%2009.15.01.png?alt=media\&token=1dc54ec0-55b5-40f8-9a8a-f8329f607a57)

{% hint style="info" %}
False sharing happens in invisible way

Hard to predict, hits the performance
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://amartyushov.gitbook.io/tech/programming-languages/java/multithreading/false-sharing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
