|
|
|
|
|
by posix_compliant
1321 days ago
|
|
I’m confused by the cache graphs: it looks like the direct-mapped cache has multiple lines drawn from a single cache line to different blocks in main memory. From what I understand, a hardware cache wouldn’t store a line multiple times in main memory. |
|
So in that direct mapped example blocks 0, 64, and 256 are all mapped to cache line 0, and you can only have one of them in cache at any given moment. If block 0 is in cache and block 256 gets accessed, block 0 will be evicted from cache because block 256 will replace it in cache line 0.