S4 · Problem set 1
Problem set 1: the iron law, Amdahl's law, power and encoding
These problems cover lessons 1 to 4: execution time and CPI, the memory wall, benchmark means, Amdahl's and Gustafson's laws, multicore sizing, power scaling and budgets, energy per task, and instruction encoding.
Check
A program of 2 billion instructions: 0.45 ALU (CPI 1), 0.3 memory (CPI 2.5), the rest branches (CPI 2), on a 3.2 GHz core.
(a)
CPI?
(b)
Execution time?
Write units the way you normally would: 1.5 s and 1500 ms are the same answer.
Check
A core with pipeline CPI 0.8 at 3 GHz misses 0.008 times per instruction to a 110 ns memory.
(a)
Total CPI?
(b)
Speedup from doubling the clock?
Check
Machine A: 1 billion instructions, CPI 1.4, 3 GHz. Machine B: 4 billion, CPI 1, 2 GHz.
(a)
B's speedup over A?
(b)
B's MIPS over A's MIPS?
Check
A machine's ratios on three benchmarks are 1.3, 0.7 and 5.
(a)
Geometric mean?
(b)
Arithmetic mean (for comparison)?
Check
A program is 0.85 parallel.
(a)
Amdahl speedup on 8 processors?
(b)
Limit with unlimited processors?
(c)
Gustafson speedup if 0.85 is the scaled run's parallel fraction?
Check
Two enhancements: 0.3 of the time sped up 5×, and a separate 0.3 sped up 4×.
(a)
Overall speedup?
(b)
What fraction of the time would the first enhancement alone have to cover for an overall speedup of 2?
Check
A symmetric chip of 64 base units with cores of 32 units (performance ), on code that's 0.95 parallel.
(a)
Number of cores?
(b)
Speedup?
Check
Each generation scales dimensions by √2, the voltage by 0.8 and the clock by 1.
(a)
Power-density growth per generation?
(b)
Fraction usable at full speed after 6 generations?
Check
A core runs at 3 GHz on 90 W (power ∝ ); a chip has 12 cores sharing one budget.
(a)
Clock for a 200 W budget?
Write units the way you normally would: 1.5 GHz, 1500 MHz and 0.0015 THz are the same answer.
(b)
Turbo clock with 2 of the 12 cores active (from 3 GHz with all active)?
Check
A task of 2 billion cycles at 1.5 GHz and 1 V: 8 nJ per cycle at 1 V (∝ ), leakage 18 W at 1 V (∝ V).
(a)
Energy?
Write units the way you normally would: 1.5 J, 1500 mJ and 0.0015 kJ are the same answer.
(b)
Energy-delay product?
Check
A 32-bit ISA with 16 registers and a 7-bit opcode in I-type, and branch offsets of 20 bits in 4-byte units.
(a)
Register bits in an R-type instruction?
(b)
I-type immediate bits?
(c)
Backward branch reach?
Check
A program has 0.45 of its instructions compressible to 16 bits; and 0.2 of its instructions are loads used only by the next instruction, which a register-memory ISA could fuse (fused CPI 3, clock period ×1, base CPI 1.3).
(a)
Compressed code size, as a percentage?
(b)
Fused version's time relative to load-store?
Check
A core with base CPI 0.8 misses to a 100 ns memory on 0.01 of its instructions; its clock goes from 3 GHz to 2 times that.
(a)
How long does an instruction take at 3 GHz?
Write units the way you normally would: 1.5 ns, 1500 ps and 0.0015 µs are the same answer.
(b)
How much faster is it at the higher clock?
Check
Three enhancements speed up disjoint fractions of a program's time: 0.2 by 5, 0.3 by 4, and 0.1 by 1.5.
(a)
What is the overall speedup?
(b)
What is the most these three parts could ever give?
Check
Each generation shrinks dimensions by 1.4 while voltage scales by only 0.9 and frequency is held.
(a)
By what factor does power density grow per generation?
(b)
What fraction of the chip can run at full speed after 6 generations?
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
15 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.