5.4.17 · D3 · HinglishMemory Hierarchy & Caches

Worked examplesPrefetching strategies

2,583 words12 min read↑ Read in English

5.4.17 · D3 · Hardware › Memory Hierarchy & Caches › Prefetching strategies

Yeh parent topic ka practice deck hai. Parent ne tools banaye the: coverage , accuracy , effective miss rate , aur AMAT. Yahaan hum inhe har us case pe drill karte hain jo ek problem mein aa sakta hai — good cases, harmful cases, degenerate cases, aur woh exam trick jo logon ko pakad leti hai.

Neeche har cheez sirf un symbols se hai jo parent ne define ki. Ek quick reminder, simple words mein:


Scenario matrix

Har prefetching problem in cells mein se kisi ek mein hoti hai. Baad ke examples mein har ek apna cell naam leta hai, isliye end tak koi bhi cell blank nahi rehti.

Cell Kya khaas hai Sign/limit stress point Example
A. Clean win acchi coverage, koi pollution nahi , bada Ex 1
B. Net loss low coverage + pollution , chhota Ex 2
C. Break-even benefit exactly pollution cancel karta hai tipping ke liye solve karo Ex 3
D. Degenerate: prefetcher kuch nahi karta limit Ex 4
E. Degenerate: prefetcher sab misses khatam karta hai limit Ex 5
F. Stride geometry ek stride seekho, lines aage rakho negative stride bhi shaamil Ex 6
G. Accuracy trap diya hai lekin multiply NAHI karna ko se alag rakho Ex 7
H. Real-world word problem accuracy se bandwidth budget wasted-fetch counting Ex 8
I. Exam twist irregular / pointer chase, koi stride nahi stride prefetch = 0 coverage Ex 9

Worked examples


Recall Self-test: kaunsa cell?

Ek prefetcher ka aur hai par. Baseline se better hai ya worse? ::: Worse. Break-even ; yahaan , isliye yeh Cell B (net loss) hai. . Hum kabhi kyun nahi likhte? ::: Kyunki coverage already sirf actually eliminated misses count karta hai (correctness + timeliness baked in). Accuracy se multiply karna double-count karta hai. bandwidth math (Ex 8) mein belong karta hai, mein nahi. Ek descending address walk 2016,1984,1952 — stride ka sign? ::: Negative (). Prefetches backward jaate hain; aage ki distance use karti hai.

Yeh bhi dekho: Cache Basics — Blocks and Locality, Spatial vs Temporal Locality, Cache Pollution and Replacement Policies, Out-of-Order Execution.