Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Cache behavior
Search
Chen
November 03, 2022
Science
0
81
Cache behavior
Chen
November 03, 2022
Tweet
Share
More Decks by Chen
See All by Chen
Example ROP in MIPS
tiffany_04192
0
50
defense
tiffany_04192
0
71
Dijkstra’s Algorithm
tiffany_04192
0
110
Floyd-Warshall
tiffany_04192
0
87
Topological sort DFS
tiffany_04192
0
86
BFS
tiffany_04192
0
120
DFS
tiffany_04192
0
95
Cache miss paper
tiffany_04192
0
110
Greedy
tiffany_04192
0
100
Other Decks in Science
See All in Science
学術講演会中央大学学員会大分支部
tagtag
0
110
機械学習を支える連続最適化
nearme_tech
PRO
1
230
ガウス過程回帰とベイズ最適化
nearme_tech
PRO
1
150
As We May Interact: Challenges and Opportunities for Next-Generation Human-Information Interaction
signer
PRO
0
360
拡散モデルの原理紹介
brainpadpr
3
5.7k
Science of Scienceおよび科学計量学に関する研究論文の俯瞰可視化_LT版
hayataka88
0
1.1k
Improving Search @scale with efficient query experimentation @BerlinBuzzwords 2024
searchhub
0
270
いまAI組織が求める企画開発エンジニアとは?
roadroller
2
1.4k
学術講演会中央大学学員会いわき支部
tagtag
0
120
深層学習を利用して 大豆の外部欠陥を判別した研究事例の紹介
kentaitakura
0
270
ベイズのはなし
techmathproject
0
390
小杉考司(専修大学)
kosugitti
2
600
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
4 Signs Your Business is Dying
shpigford
182
22k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.6k
The Cost Of JavaScript in 2023
addyosmani
47
7.3k
Designing for humans not robots
tammielis
250
25k
Designing for Performance
lara
604
68k
Embracing the Ebb and Flow
colly
84
4.6k
Typedesign – Prime Four
hannesfritz
40
2.5k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
Done Done
chrislema
182
16k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Transcript
23 Cache Behavior Example Set # Valid Tag Data 0
0 000 00 00 00 00 1 0 000 00 00 00 00 2 0 000 00 00 00 00 3 0 000 00 00 00 00 4 0 000 00 00 00 00 5 0 000 00 00 00 00 6 0 000 00 00 00 00 7 0 000 00 00 00 00 Cache starts empty (valid = 0), 8 blocks (or sets) in cache, 4B blocks, 16-bit address
24 Cache Behavior Example Set # Valid Tag Data 0
0 000 00 00 00 00 1 0 000 00 00 00 00 2 0 000 00 00 00 00 3 0 000 00 00 00 00 4 0 000 00 00 00 00 5 0 000 00 00 00 00 6 0 000 00 00 00 00 7 0 000 00 00 00 00 Access address 0x1234 = 0001 0010 0011 0100 Offset = 0 Index = 5 Tag = 145 Valid bit == 0 à miss
26 Cache Behavior Example Set # Valid Tag Data 0
0 000 00 00 00 00 1 0 000 00 00 00 00 2 0 000 00 00 00 00 3 0 000 00 00 00 00 4 0 000 00 00 00 00 5 1 145 0F 1E 39 EC 6 0 000 00 00 00 00 7 0 000 00 00 00 00 Access address 0x1234 = 0001 0010 0011 0100 lb: 00 00 00 EC lh: 00 00 39 EC lw: 0F 1E 39 EC Offset = 2 Tag = 145 Index = 5 Valid && tag match à hit
27 Cache Behavior Example Set # Valid Tag Data 0
0 000 00 00 00 00 1 0 000 00 00 00 00 2 0 000 00 00 00 00 3 0 000 00 00 00 00 4 0 000 00 00 00 00 5 1 145 0F 1E 39 EC 6 0 000 00 00 00 00 7 0 000 00 00 00 00 Valid && tag match à hit lb: 00 00 00 1E lh: 00 00 0F 1E lw: (unaligned) Access address 0x1236 = 0001 0010 0011 0110 Offset = 2 Index = 5 Tag = 145
28 Cache Behavior Example Set # Valid Tag Data 0
0 000 00 00 00 00 1 0 000 00 00 00 00 2 0 000 00 00 00 00 3 0 000 00 00 00 00 4 0 000 00 00 00 00 5 1 145 0F 1E 39 EC 6 0 000 00 00 00 00 7 0 000 00 00 00 00 Access address 0x1238 = 0001 0010 0011 1000 Offset = 0 Index = 6 Tag = 145 Not valid à miss
29 Cache Behavior Example Set # Valid Tag Data 0
0 000 00 00 00 00 1 0 000 00 00 00 00 2 0 000 00 00 00 00 3 0 000 00 00 00 00 4 0 000 00 00 00 00 5 1 145 0F 1E 39 EC 6 0 000 00 00 00 00 7 0 000 00 00 00 00 Access address 0x1238 = 0001 0010 0011 1000 1 145 Make request to next level... Wait for it…
30 Cache Behavior Example Set # Valid Tag Data 0
0 000 00 00 00 00 1 0 000 00 00 00 00 2 0 000 00 00 00 00 3 0 000 00 00 00 00 4 0 000 00 00 00 00 5 1 145 0F 1E 39 EC 6 1 145 3C 99 11 12 7 0 000 00 00 00 00 Access address 0x2234 = 0010 0010 0011 0100 Offset = 0 Index = 5 Tag = 273 Valid, but tags don’t match à miss
31 Cache Behavior Example Set # Valid Tag Data 0
0 000 00 00 00 00 1 0 000 00 00 00 00 2 0 000 00 00 00 00 3 0 000 00 00 00 00 4 0 000 00 00 00 00 5 1 145 0F 1E 39 EC 6 1 145 3C 99 11 12 7 0 000 00 00 00 00 Access address 0x2234 = 0010 0010 0011 0100 Make request to next level... Wait for it… 273
32 Cache Behavior Example Set # Valid Tag Data 0
0 000 00 00 00 00 1 0 000 00 00 00 00 2 0 000 00 00 00 00 3 0 000 00 00 00 00 4 0 000 00 00 00 00 5 1 273 01 CF D0 87 6 1 145 3C 99 11 12 7 0 000 00 00 00 00 Access address 0x2234 = 0010 0010 0011 0100 Note that now, 0x1234’s data is gone Replaced by 0x2234’s data