π‘
Register
<Cache (L1<L2<L3)
<Main Memory (DRAM)
<Disk (SSD/HDD)
<Network/Cloud
κ°μλ©λͺ¨λ¦¬λ λμ€ν¬μμ λ©λͺ¨λ¦¬λ‘ μ΄λ»κ² κ°μ Έμ¬ κ²? (μ΄μ체μ )
λ©λͺ¨λ¦¬μμ μΊμλ‘ μ΄λ»κ² κ°μ Έμ¬ κ²? (μ»΄ν¨ν°κ΅¬μ‘°)
π‘ μ΅κ·Ό μμ£Ό μ¬μ©λλ κ²λ€μ λ€μ μ¬μ©λ κ°λ₯μ±μ΄ μλ€.
βοΈ Spatial Locality: nearby references are likely to occur soon
βοΈ Temporal Locality : the same references is likely to occur soon
βοΈ Speed vs. Size tradeoff
π‘ A small but fast memory located between processor and main memory
βοΈ Benefits
βοΈ Cache Block Allocation (when to place)
βοΈ Cache Block Placement (where to place)
βοΈ Cache Block Replacement
Random
LRU (least recently used)
Replacement policy critical for small caches
βοΈ Cold-start misses (or compulsory misses)
βοΈ Capacity misses
βοΈ Conflict misses (or collision misses)
βοΈ Invalidation misses (or sharing misses)
[KUOCW] μ΅λ¦° κ΅μλμ μ΄μ체μ κ°μλ₯Ό μκ°νκ³ μ 리ν λ΄μ©μ λλ€. μλͺ»λ λ΄μ©μ΄ μλ€λ©΄ λκΈλ‘ μλ €μ£Όμλ©΄ κ°μ¬νκ² μ΅λλ€ π