修改console缓存大小
Prerequisites: Memory mapping and its types
先决条件: 内存映射及其类型
While designing a cache system of a PC, the size of cache lines is an important parameter.
在设计PC的缓存系统时,缓存行的大小是重要的参数。
In the caching system, the size of the cache line affects a lot of parameters.
在缓存系统中,缓存行的大小会影响很多参数。
The following results show the effect of changing the cache block or line size in a caching system.
以下结果显示了在缓存系统中更改缓存块或行大小的影响。
1) In what ways changing block size affect spatial locality?
1)改变块大小会以什么方式影响空间局部性?
Spatial Locality indicates, if any word is in the cache then next time it will be referenced in a short amount of time.
空间局部性表明,如果高速缓存中有任何单词,则下次将在很短的时间内引用它。
If the block size is large then the spatial locality will be better.
如果块大小较大,则空间位置会更好。
By keeping the cache size constant, we have two cases as follows,
通过保持高速缓存大小不变,我们有以下两种情况:
Case 1: Decreasing the Block Size
情况1:减小块大小
Smaller block size will contain a less number of nearby addresses in it. Thus, only a small number of nearby addresses will be brought into the cache.
较小的块大小将在其中包含较少数量的附近地址。 因此,只有少量附近的地址将被带入高速缓存。
Due to the small size of the block increases the chances of cache miss which reduces the exploitation of spatial locality.
由于块的小尺寸,增加了高速缓存未命中的机会,这减少了对空间局部性的利用。
Thus, smaller is the block size, inferior is the spatial locality.