S4 Computer architecture · Practice
I/O interconnects, DMA and interrupts
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 8 kinds solid
Check
A link has 1 lanes at 8 GT/s with an encoding efficiency of 0.9846. What is its bandwidth in each direction?
Check
A NIC receives 10 Gb/s of 64-byte packets; each interrupt costs 5 µs of CPU.
(a)
How many cores do interrupts use at one per packet?
(b)
And with one interrupt per 64 packets?
Check
A device has 20 µs of latency per request. How many requests must be outstanding to sustain 0.5 million per second?
Check
A PCIe transfer carries 256 bytes of payload with 24 bytes of packet overhead. What percentage of the link carries payload?
Check
A NIC at 40 Gb/s coalesces 64 packets of 1500 bytes per interrupt. Up to how much latency does that add to the first packet of a batch?
Write units the way you normally would: 1.5 µs, 1500 ns and 0.0015 ms are the same answer.
Check
Simulate interrupt coalescing. Packets arrive as a Poisson process at lam = 0.6 per µs (exponential gaps, rng = random.Random(1), 100 000 packets). The NIC raises an interrupt when B = 8 packets have accumulated or 20 µs after the first unserviced packet, whichever comes first. Set irq_rate (interrupts per µs), mean_wait (average µs from a packet's arrival to its interrupt) and per_packet (irq_rate / lam).
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
What is the per-direction bandwidth of PCIe with 2 lanes at 8 GT/s and 128b/130b encoding?
Check
How many requests must be in flight to sustain 0.25 million per second at 50 µs latency?
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