S4 Computer architecture · Practice
Problem set 7: memory systems, virtualization, networks and security
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.
Check
A guest uses 4-level page tables on a host with 4-level nested tables. Huge pages in both remove one level from each.
(a)
How many accesses can a TLB miss take?
(b)
And with huge pages in both dimensions?
Check
A VM causes 20000 exits a second at 1 µs each, on a 32-core host running one such VM per core.
(a)
What fraction of each core goes to exits?
(b)
How many cores' worth is that across the host?
Check
Each core moves 1 bytes from memory per instruction at IPC 1.5 and 3.5 GHz; the server has 12 channels at 4800 MT/s (8 bytes wide) for 64 cores.
(a)
What bandwidth does each core need?
(b)
What is each core's share?
Check
A chip's memory delivers 100 GB/s at 80 ns, in 64-byte lines; each core can keep 24 misses in flight.
(a)
How many misses must be in flight for full bandwidth?
(b)
How many cores does that take?
Check
Local memory takes 85 ns and remote 140 ns; a thread makes 0.5 of its accesses remote.
(a)
What is its average latency?
Write units the way you normally would: 1.5 ns, 1500 ps and 0.0015 µs are the same answer.
(b)
How much slower is that than all-local?
Check
A kernel moves 0.5 GB from DRAM at 5 pJ per bit and performs 10 × 10⁹ operations at 20 pJ each.
(a)
What energy does it use in all?
Write units the way you normally would: 1.5 J, 1500 mJ and 0.0015 kJ are the same answer.
(b)
What share is data movement?
Check
An 8 × 8 mesh has 2-cycle routers and 1-cycle links 32 bytes wide; packets carry 128 bytes.
(a)
What is the zero-load latency at the average distance?
(b)
What injection rate per node saturates it under uniform traffic, in bytes per cycle?
Check
A link's credit loop: 1 cycle(s) across, 3 through the next router, 2 for the credit's return. Each virtual channel has 8 buffers.
(a)
What is the credit round trip?
(b)
What fraction of the link can one virtual channel use?
Check
A cache covert channel sends a symbol every 1000 cycles at 3 GHz and misreads 0.25 of them.
(a)
What information rate can it reach with ideal coding?
Check
A Spectre round takes 5000 cycles of setup plus 256 probes of 150 cycles, at 5 GHz; the target is a 32-byte key.
(a)
How fast does it leak?
(b)
How long does the key take?
Write units the way you normally would: 1.5 µs, 1500 ns and 0.0015 ms are the same answer.
Check
DRAM rows cycle in 40 ns with a 32 ms refresh window; a victim row flips after 100000 neighbor activations.
(a)
How many activations fit in a window?
(b)
What fraction of the window does an attack need?
Check
8 cores each have a 1 MB private L2 under a 64 MB L3 sliced over a 6 × 6 mesh (10-cycle slices, 2 cycles per hop).
(a)
How much distinct data fits if the L3 is exclusive?
(b)
What is the average latency to an L3 slice?
Check
A 16 MB, 8-way LLC with 64-byte lines uses tree pseudo-LRU. A program that misses 0.04 alone shares it equally among 8 programs.
(a)
How much replacement state does the cache hold?
(b)
What miss rate does the program see when sharing?
Check
A side channel through the L1 can be closed two ways: flushing the L1 on every context switch, at 2 µs per flush with 50 thousand switches a second; or partitioning the cache, which multiplies a program's miss rate by 2. The program spends 10% of its time in cache stalls before partitioning.
(a)
What does flushing cost, as a fraction of a core?
(b)
How much more time does partitioning add, if stalls grow in proportion to the miss rate?
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 S4