S4 · Midterm exam
Midterm exam: performance, pipelines, out-of-order execution and caches
Twelve problems from lessons 1 to 20: the iron law and the memory wall, Amdahl's law and multicore sizing, power scaling, instruction encoding, pipeline depth, branch prediction, out-of-order windows and speculation, ILP, multithreading and heterogeneous cores, and cache performance. Give yourself two and a half hours and work without the lessons open. "Another set" deals a different exam.
Check
A program of 2 billion instructions at pipeline CPI 1.1 on a 3.5 GHz core, missing 0.015 times per instruction to an 80 ns memory.
(a)
Total CPI?
(b)
Execution time?
Write units the way you normally would: 1.5 s and 1500 ms are the same answer.
Check
A program is 0.9 parallel.
(a)
Speedup on 16 processors?
(b)
Parallel fraction needed for 10× on 16?
Check
A symmetric multicore of 128 base units, cores of 16 units each (performance ), on code 0.95 parallel.
(a)
Speedup?
(b)
Speedup with 128 one-unit cores instead?
Check
Generations scale dimensions by √2 and voltage by 0.85, with a fixed clock; separately, a 3.5 GHz core uses 140 W, power ∝ .
(a)
Usable fraction after 3 generations?
(b)
Clock at 180 W?
Write units the way you normally would: 1.5 GHz, 1500 MHz and 0.0015 THz are the same answer.
Check
A 32-bit ISA with 32 registers and an 8-bit I-type opcode; branch offsets of 21 bits in 2-byte units.
(a)
I-type immediate bits?
(b)
Backward branch reach?
Check
100 FO4 of logic per instruction, 3 FO4 of overhead per stage, 0.06 stalls per instruction per stage.
(a)
Optimal depth?
(b)
Time per instruction at 30 stages, in FO4?
Check
A loop of 5 iterations runs repeatedly; separately, a core with base CPI 0.6, 0.22 branches and a 14-cycle penalty improves its predictor from 0.95 to 0.97.
(a)
2-bit counter misprediction rate on the loop?
(b)
Speedup from the better predictor?
Check
A 4-wide core with 25 cycles of average latency and a 192-entry window; 3 result buses, 0.8 of instructions producing results.
(a)
Window for full width?
(b)
IPC with 192 entries?
(c)
IPC limit from the buses?
Check
A 150-entry speculative window with a branch every 5 instructions at accuracy 0.95; 0.3 loads, 0.02 of them replayed at 15 cycles.
(a)
Useful instructions in the window?
(b)
Replay CPI?
Check
A block of 30 instructions with a 6-long dependence chain; a reduction on a unit of latency 5 that starts 2 per cycle.
(a)
Dataflow IPC?
(b)
Partial sums needed?
Check
Threads run 15 cycles between 200-cycle misses; coarse switching costs 10.
(a)
Fine-grained threads to saturate?
(b)
Coarse-grained threads to reach its ceiling?
Check
L1 hits in 1, misses 0.04; L2 hits in 16, misses 0.35 locally; memory 200 cycles.
(a)
AMAT?
(b)
L2 global miss rate?
Check
15000 misses direct-mapped, 9000 fully associative, 5000 infinite.
(a)
Conflict?
(b)
Capacity?
Check
A blocked 1024 × 1024 matrix multiply with 16 × 16 tiles; 16 misses of 260 cycles overlapping 4 at a time.
(a)
Traffic reduction?
(b)
Stall cycles for the misses?
Check
A task of 2 billion cycles at 2 GHz and 0.9 V (8 nJ per cycle and 15 W of leakage at 1 V); and a VLIW whose code is 1.2× larger than dense.
(a)
Task energy?
Write units the way you normally would: 1.5 J, 1500 mJ and 0.0015 kJ are the same answer.
(b)
Fraction of the VLIW's slots that are NOPs?
Check
A chip of 64 base units runs code that's 0.975 parallel, built either from 4-unit cores only or with one 4-unit core and single units elsewhere.
(a)
What does the symmetric design reach?
(b)
And the asymmetric one?
Have paper and a calculator ready. Work each problem out by hand, then enter the answer. Your first try on each one counts toward your score.
Practice
Keep practicing
16 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.