CPU cache-write combine/Write Through/write back

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.