Open main menu

CDOT Wiki β

Changes

GPU621/False Sharing

28 bytes added, 19:13, 4 December 2021
m
What is a Cache?
=== What is a Cache? ===
[[File:memory_hierarchy.png|right|600px|thumb|Hierarchy of memory storage.]]
Before we can talk about false sharing, we need a brief overview of a cache. Like other storage mediums, a cache is a place used to store data and instructions that the CPU may use.
At the same time, only small amounts piece of data is needed at a given moment. Even if you brought everything in from memory, most of it will be unused. Utilizing the hierarchy of memory storage, the most relevant data can be siphoned from secondary memory ahead of time and stored in the cache and RAM. When searching for data, the CPU can grab it from the cache, a cache hit. If it is not there, a cache miss, then it looks moves down the hierarchy until it finds it. Minimizing the number of cache misses ensures the CPU has a steady flow of data it can quickly retrieve and compute.
 
=== Cache Coherence and Cache Line ===
83
edits