C8 Computer organization · Practice
Cache design
Problems dealt one at a time, with new numbers every time. The kinds you miss come back more often, and you can keep going as long as you like.
0 solved
0 in a row
0 of 10 kinds solid
Check
A 32 KiB, 8-way set-associative cache has 32-byte lines; addresses are 32 bits.
(a)
How many sets?
(b)
How many index bits?
(c)
How many tag bits?
Check
L1 hits in 1 cycles and misses 0.03 of the time; L2 hits in 15 cycles and misses 0.4 of the accesses that reach it; memory takes 80 cycles.
(a)
What is the AMAT?
(b)
How many times better is that than L1 alone with memory behind it?
Check
A loop reads every element of an array of 1000 elements of 1 bytes, aligned to a line, once, through a cache with 64-byte lines that starts empty.
(a)
How many misses?
(b)
What is the miss rate?
Check
A cache has 256 sets of 16-byte lines. Which set does address 74565 map to, and at what offset?
(a)
Which set?
(b)
What offset within the line?
Check
A loop stores to the same word 100 times, and the line is evicted afterward.
(a)
How many memory writes does a write-through cache make?
(b)
How many line write-backs does a write-back cache make?
Check
L1 hits in 1 cycle and misses 5%; L2 takes 8 cycles and misses 40% of what reaches it; memory takes 150.
(a)
What's the AMAT in cycles?
(b)
What fraction of all accesses go to memory?
Check
A 32 KiB, 2-way cache has 64-byte lines and 32-bit addresses.
(a)
How many index bits?
(b)
How many tag bits?
Check
How many index bits does a 16 KiB, 4-way cache with 32-byte lines use?
Check
L1: 1 cycles, 0.04 misses; L2: 20 cycles, 0.5 local misses; memory 100 cycles. What is the AMAT?
Check
How many misses does reading 512 elements of 2 bytes once, sequentially and line-aligned, cause with 64-byte lines?
A kind of problem counts as solid once you've got it right on the first try twice in a row. Back to the lesson · Practice every topic in C8