C8 Computer organization · Practice
Caches and pipelines,
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 cache hits in 1 ns, a miss costs 100 ns more, and 2% of accesses miss. What's the average access time?
Write units the way you normally would: 1.5 ns, 1500 ps and 0.0015 µs are the same answer.
Check
A direct-mapped cache holds 4 KiB in 16-byte lines, for 32-bit addresses.
(a)
How many offset bits?
(b)
How many index bits?
(c)
How many tag bits?
Check
A 5-stage pipeline with no stalls runs 19 instructions. How many cycles from the first fetch to the last write back?
Check
On a 5-stage pipeline, 25% of instructions are loads, and half of those are followed at once by an instruction that uses the loaded value (1 stall cycle each). 10% are branches, and 40% of those are mispredicted (2 cycles lost each). What's the average CPI?
Check
A cache hits in 1 ns and a miss costs 40 ns.
(a)
What's the largest miss rate that keeps the average at 5 ns?
(b)
What's the average at a 1% miss rate?
Write units the way you normally would: 1.5 ns, 1500 ps and 0.0015 µs are the same answer.
Check
A direct-mapped 16 KiB cache has 16-byte lines and 32-bit addresses.
(a)
How many offset bits?
(b)
How many index bits?
(c)
How many tag bits?
Check
Hit 1 ns, penalty 120 ns, miss rate 1%. AMAT?
Write units the way you normally would: 1.5 ns, 1500 ps and 0.0015 µs are the same answer.
Check
70 instructions through a 5-stage pipeline, no stalls. Cycles?
Check
Index bits for an 8 KiB direct-mapped cache with 16-byte lines?
Check
15% loads (half followed by a use: 1 stall), 12% branches (30% mispredicted: 2 cycles). CPI?
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