S422 of 55
0 XP
  1. Hook
  2. Problems

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 r), 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 ∝ f3.

(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?

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.