这个示例使用了一个固定大小的高速缓存,如1 MB的存储器或100个高速缓存项。
This example USES a fixed size cache, such as 1 MB of storage or 100 cached items.
如果数据或指令没有出现在高速缓存中,或者如果高速缓存线路无效的时候,CPU通过从主存储器中读数据来更新它的高速缓存。
If the data or instruction is not present in the cache, or if the cache line is invalidated, the CPU updates its cache by reading the data from the main memory.
通过把该数据结构的两个元素分离到两条不同的高速缓存线路,一条高速缓存线路的修改就不会导致再次从存储器读入另外一条高速缓存线路。
By separating the two elements of the structure into two different cache lines, modification of one cache line does not cause another cache line to be read in again from the memory.
应用推荐