修改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.pswp.cn/news/542821.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/542821.shtml
英文地址,請注明出處:http://en.pswp.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;如果可以要求服務器對第二個參數做一些奇怪的事情——如果對命令內容的控制不足以避免不希…