From: http://www.wretch.cc/blog/hyper0672/9867141
In order to accelerate the access to code and data, the CPU puts the accessed resources in the cache to accelerate the dynamic operation. Cache
It is a relatively small and faster system memory.
In Intel's design, the cache also has a shard (L1, L2, L3 cache), and the CPU will first go to L1
Search for the required information in the cache. If there is no, find the L2 cache and L3 if there is no more.
Cache. You can't find any information before you can search for it in the system record.
Famous Words
Cache line:
Minimum bit (usually 8
-512 bytes ). Taking Pentium III as an example, the length of its cache line is 32 bytes.
Cache line
Fill:
Actions for moving the system memory content to the cache
Cache hit & cache miss:
Processor
To retrieve a notebook, if the notebook already exists in the cache, it is regarded as cache hit. The opposite is cache miss.
Write
Hit:
When processor wants to import a notebook, if the notebook already exists in the cache, it should be cache hit. When writing hit
At the time of creation, different policies in the root role will initiate different actions.
Snoop:
In the multi-processor environment, the CPU must control other CPUs.
To ensure that all CPU cores can be synchronized.
memory type
the CPU
can perform different cache actions on the system memory.
string uncacheable (UC)
cannot be
cached
uncacheable (UC-)
cannot be cached, but can be set by mtrr, modified to WC (write
combining)
write combining (WC)
cannot be cached by
, but the actions that are merged can be extended, in addition, it can be used together with other notebook operations to reduce the access of the website. This feature applies to memory that is irrelevant to the incoming order (for example, video
memory)
write through (wt)
all actions of zookeeper can be cached. The operation that you initiate must be synchronized to the cache at the same time.
write back (WB)
all actions of zookeeper can be cached. Only when the cache line
is to be removed, the operation of the system memory is returned. This method can achieve the highest efficiency.
write protected (WP)
only the actions of the worker can be cached. When the
CPU worker performs the same operation, the cached memory becomes invalid.