修改console缓存大小_更改缓存的行大小将如何影响其他参数?

修改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.

    因此,块大小较小,空间局部性较差。

Case 2: Increasing the Block Size

情况2:增加块大小

  • A large block size will contain a number of nearby addresses in it. Thus, a larger number of nearby addresses will be brought into the cache.

    大的块大小将在其中包含许多附近的地址。 因此,大量附近的地址将被带入缓存。

  • This increases the chances of cache hit which increases the exploitation of spatial locality.

    这增加了缓存命中的机会,从而增加了对空间局部性的利用。

  • If the block size is large hen experiences better spatial locality.

    如果块大,则母鸡的空间定位更好。

2) In what ways changing block size affect On Cache Tag in Fully Associative Cache?

2)更改块大小会以什么方式影响完全关联缓存中的“缓存标签”?

Case 1: Decreasing the Block Size

情况1:减小块大小

  • If we are keeping the cache size constant and decreasing the block size then it will decrease the number of bits in block offset.

    如果我们保持高速缓存大小不变并减小块大小,那么它将减少块偏移量的位数。

  • With the decrease in the number of bits in block offset, the number of bits in tag increases.

    随着块偏移中位数的减少,标签中位数的增加。

Case 2: Increasing the Block Size

情况2:增加块大小

  • Keeping the cache size constant,

    保持高速缓存大小不变,

  • Increasing the block size increases the number of bits in block offset.

    增加块大小会增加块偏移量的位数。

  • With the increase in the number of bits in block offset, the number of bits in tag decreases.

    随着块偏移中位数的增加,标签中位数的减少。

3) In what ways changing block size affect on Cache Tag in Set Associative Cache?

3)更改块大小会以哪些方式影响Set Associative Cache中的Cache Tag?

Case 1: Decreasing the Block Size

情况1:减小块大小

  • If we are keeping the cache size constant it will increase the number of lines in the cache and also the number of sets in the cache then the number of bits in set number increases.

    如果我们保持高速缓存大小不变,则会增加高速缓存中的行数以及高速缓存中的集数,因此集数中的位数会增加。

  • When the block size decreases then the number of bits in block offset also decreases.

    当块大小减小时,块偏移量中的位数也会减少。

  • So, the number of bits in the set number and number of bits in block offset will remain constant that is no change on the cache tag.

    因此,设置数量中的位数和块偏移中的位数将保持不变,这在缓存标签上不会发生变化。

effects of changing line size (1)

Case 2: Increasing the Block Size

情况2:增加块大小

  • If we are increasing the block size then it decreases the number of lines in the cache and increases the number of bits in block offset.

    如果我们要增加块大小,那么它将减少高速缓存中的行数,并增加块偏移量的位数。

  • With the decrease in the number of cache lines, the number of sets in cache decreases and also the number of bits in set number decreases.

    随着高速缓存行数量的减少,高速缓存中的集合数量减少,并且集合数量中的位数也减少。

  • So, the number of bits in the set number and number of bits in block offset will remain constant that is no effect on the cache tag.

    因此,设置数量中的位数和块偏移中的位数将保持不变,这对缓存标签没有影响。

effects of changing line size (2)

4) In what ways Changing block size affect On Cache Miss Penalty?

4)更改块大小会以何种方式影响“高速缓存未命中罚款”?

  • When a cache miss happens, the required block of the word has to be brought from the main memory.

    当发生高速缓存未命中时,必须从主存储器中提取所需的字块。

  • Time taken to bring the block in the cache will be less if the block size is small. Hence, less miss penalty will incur.

    如果块大小较小,则将块放入高速缓存所需的时间会更少。 因此,将产生较少的未命中罚款。

  • If the block size is large so the time taken to bring the block in the cache will be more. Hence, more miss penalty will incur.

    如果块大小很大,那么将块带入缓存所需的时间会更多。 因此,将招致更多的未命中罚款。

5) In what ways changing block size affect on Cache Tag in Direct Mapped Cache?

5)更改块大小会以什么方式影响直接映射缓存中的缓存标签?

Case 1: Decreasing the Block Size

情况1:减小块大小

  • If we are keeping the cache size constant and decreasing the block size, this will increases the number of lines in the cache.

    如果我们保持高速缓存大小不变并减小块大小,这将增加高速缓存中的行数。

  • With the decrease in block size, the number of bits in block offset decreases.

    随着块大小的减小,块偏移的位数减少。

  • However, the number of bits in line number increases the cause of increasing the number of cache lines.

    但是,行号中的位数增加了导致高速缓存行数增加的原因。

  • With the increasing number of cache lines, the number of bits in line number together with the number of bits in block offset will remain constant that is there is no effect on the cache tag.

    随着高速缓存行数目的增加,行号中的位数和块偏移中的位数将保持不变,这对高速缓存标签没有影响。

Case 2: Increasing the Block Size

情况2:增加块大小

  • With increasing the block size the number of lines in cache decreases and the number of bits in block offset increases.

    随着块大小的增加,高速缓存中的行数减少,并且块偏移量中的位数增加。

  • However, with the decreasing number of cache lines, the number of bits in line number decreases.

    但是,随着高速缓存行的数量减少,行号中的位数减少。

  • So, the number of bits in line number and number of bits in block offset will remain constant. Hence, no effect on the cache tags.

    因此,行号中的位数和块偏移中的位数将保持不变。 因此,对缓存标签没有影响。

6) In what ways Cache Tag affect on Cache Hit Time?

6)缓存标记以什么方式影响缓存命中时间?

  • The time required to find out whether the required block is in cache or not is cache hit time.

    找出所需块是否在缓存中所需的时间是缓存命中时间。

  • It this comparing the tag of cache lines with the tag of the generated address.

    它将缓存行的标签与生成的地址的标签进行比较。

  • Hence, Smaller is the cache tag, lesser will be the time taken to perform the comparisons so smaller cache tag ensures lower cache hit time and larger is the cache tag results in a higher cache hit time.

    因此,缓存标签较小,执行比较所需的时间更少,因此较小的缓存标签可确保较低的缓存命中时间,而较大的缓存标签可导致较高的缓存命中时间。

References:

参考文献:

  • Set Associative Mapping | Set Associative Cache

    设置关联映射| 设置关联缓存

  • Cache performance measurement and metric

    缓存性能度量和指标

翻译自: https://www.includehelp.com/operating-systems/how-changing-the-line-size-of-cache-will-affect-other-parameters.aspx

修改console缓存大小

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/542821.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

win10必须禁用的服务_Win10系统中这3个无用的设置,奉劝你还是早点关闭吧!

在PC端所有的操作系统中,占据市场份额最大的莫过于微软发布的windows系统。其中最经典的莫过于XP和win7,无奈微软已经停更了这两个操作系统,所以为了电脑的安全着想,很多人都直接升级更新至最新版的win10系统,目前win1…

Android 布局练习

要求&#xff1a;使用多种布局完成以下练习。 1.要求效果 完成效果 代码&#xff1a; <?xml version"1.0" encoding"utf-8"?> <…

有危害吗_涂料漆对身体有害吗?涂料漆危害怎么预防

目前很多人都会通过涂料漆来进行墙面装饰&#xff0c;用它来对墙面进行装饰是可以马上的改善墙壁的状态&#xff0c;但有些人也担心它会对身体有害&#xff0c;涂料漆对身体有害吗?由于担心涂料漆会给健康带来危害&#xff0c;很多人都想要预防&#xff0c;那涂料漆危害怎么预…

小写大写转换_小写到大写转换器JavaScript工具| 网络应用项目

小写大写转换Hi! At times, beginners always find it hard getting the application of the theory they learn in programming or a particular language. 嗨&#xff01; 有时&#xff0c;初学者总是很​​难在编程或特定语言中应用他们学到的理论。 In this article, well…

inventor扳手制作视频_弱电工程视频监控系统施工方案,可作施工组织设计

1 工程概况 1.1 编制《工程总体实施方案》 主要包括&#xff1a;结合高清监控系统设计方案作配套的深化设计&#xff0c;编制高清监控系统实施计划&#xff0c;并提出相关的配合要求。根据总体方案&#xff0c;对高清监控系统工程的技术设计作必要的补充。并提出相关的实施技术…

python print与input

python基础语法1print()函数input()函数print()函数 不用引号&#xff0c;函数内为数字或数字运算 单引号&#xff0c;整条语句结构&#xff0c;’\n’ 双引号&#xff0c;函数结构 三引号&#xff0c;对内容进行换行输出 print("let is go")#函数结构 print(let i…

lol最克制诺手的英雄_LOL:究竟有没有完美克制诺手的英雄?时光上单或可一战?...

小伙伴们大家好&#xff0c;我是小数点。诺克萨斯之手德莱厄斯&#xff0c;他可以说是每一位上单玩家的噩梦了&#xff0c;因为喜欢玩诺手的人特别多&#xff0c;而会玩的诺手却一般都在对面。要知道诺手这样英雄拿到优势凶起来&#xff0c;你就没得打了&#xff0c;就算在塔下…

Oracle 创建表空间,用户,赋值(简装)

一&#xff0c;1.Oracle 创建表空间&#xff0c;用户&#xff0c;赋值&#xff08;简装&#xff09;C:\Documents and Settings\Administrator>sqlplus /nologSQL> conn /as sysdba2.删除用户drop user username cascade;3.创建自增表表空间SQL> create tablespace 表…

编程语言难度排名_编程语言TOP10!该如何选择适合自己的?

本文转载自公众号“读芯术”(ID&#xff1a;AI_Discovery)编程领域大约有700种代码语言。理解编程语言的重要性以及其如何影响需要执行的具体任务至关重要。一篇文章穷尽700 种语言不现实&#xff0c;也没有意义。因此&#xff0c;笔者挑选出了时下最热门的原因&#xff0c;在本…

测试私有方法 重构_一个全栈工程师重构之路:中小公司 DevOps 落地实践

为了这篇文章&#xff0c;我前后写了将近十篇文章铺垫&#xff0c;才将这篇整体重构思想引出。背景先说下背景&#xff0c;我们是一家小公司&#xff0c;虽然打着做产品的旗帜&#xff0c;但是每个客户都有大量的个性化功能&#xff0c;这里指各个客户的java端、Android端、ios…

python变量 数据类型 列表 元组 字典

python基础语法2变量数据类型与类型转换列表添加列表元素修改元素删除列表元素组织列表创建数值列表操作列表元组元组转列表字典创建字典列表取值字典删除增加修改变量 变量命名要求&#xff1a; 1.只能是一个词 2.只能包含字母、数字、下划线 3.不能用数字开头 变量定义位置不…

HDU 5777 domino

贪心一下。有k次机会&#xff0c;也就是那些数字中&#xff0c;最大的k-1可以不选择。答案为&#xff1a;sum{a[i]}-sum{最大的k-1个a[i]}n。注意&#xff1a;k>n的时候直接输出n。 #pragma comment(linker, "/STACK:1024000000,1024000000") #include<cstdio&…

puppeteer执行js_使用Node.js和Puppeteer与表单和网页进行交互– 2

puppeteer执行jsHi guys! Today lets look at another powerful function of the puppeteer API using Node.js part 2. 嗨&#xff0c;大家好&#xff01; 今天&#xff0c;让我们看看使用Node.js第2部分的puppeteer API的另一个强大功能。 In the first part of this sectio…

好用的平板电脑_小熊分享|这五款平板电脑的性价比绝了!

【叶紫网】独乐乐不如众乐乐&#xff0c;点击上方头像并添加关注&#xff0c;与叶紫科技小熊一起探索科技的奥秘。要说当代年轻人的消费观&#xff0c;我们也是说要该花花&#xff0c;该省省&#xff0c;像现在的科技产品更新换代的速度&#xff0c;就算我们的荷包相当的鼓&…

python if语句 for语句 while语句

python基础语法3if语句for循环while循环else语句退出循环if语句 执行条件判断&#xff0c;符合执行if内语句&#xff0c;否则执行elif或者else。 if、elif、else都要接冒号&#xff0c;注意缩进 各级条件互斥 后面的条件可以接列表&#xff0c;表示或关系 contribution860 if…

交际过程的两个基本环节_跨文化交际学概论笔记(二)

第二部分 基本概念&#xff1a;文化与交际第一章 文化的定义与特征一、文化的定义1. 文化的定义为何重要首先&#xff0c;在跨文化交际学中文化是一个至关重要的问题。研究时&#xff0c;不可避免进行文化对比。其次&#xff0c;在研究任何学科前&#xff0c;术语的界定是前提。…

Python中列表的del,remove和pop函数之间的区别

1)Python del函数 (1) Python del function) del is nothing but "delete". del is a keyword which basically goes on the position given by the user in del(position) and deletes that element and also changes the positions of all the other elements as i…

lcd图片转二进制工具_辽宁2.8寸LCD屏价格,测距仪LCD显示屏_思迈微

首页 > 新闻中心发布时间&#xff1a;2020-11-15 08:27:09 导读&#xff1a;思迈微为您提供辽宁寸LCD屏价格,测距仪LCD显示屏的相关知识与详情&#xff1a; 以上便是对LED点阵式显示屏的软硬件系统、组成等的技术知识的粗略的介绍。以这款名为《液晶显示器亮点坏点修复工具》…

python 布尔值 布尔运算 运算符

python基础语法4布尔值布尔运算运算符算术运算符赋值运算符比较运算符逻辑运算符布尔值 布尔值&#xff1a;Ture&#xff08;真&#xff09; Flase&#xff08;假&#xff09; 假&#xff1a;Flase、0、’’&#xff08;空字符串&#xff09;、[]&#xff08;空列表&#xff0…

python代码安全性问题_这个python代码对注入安全吗?

我在Python中有一个服务器/客户机套接字对。服务器接收特定的命令&#xff0c;然后准备响应并将其发送到客户端。在在这个问题中&#xff0c;我关心的只是代码中的可能的注入&#xff1a;如果可以要求服务器对第二个参数做一些奇怪的事情——如果对命令内容的控制不足以避免不希…