S421 of 55
0 XP
  1. Hook
  2. Problems

S4 · Problem set 4

Problem set 4: superscalar limits, multithreading, cache performance and cache optimizations

These problems cover lessons 13 to 20: dataflow limits and the cost of width, VLIW code size and unrolling, thread counts for hiding latency, heterogeneous multicores, multilevel access times and the three Cs, blocking, memory-level parallelism and prefetching, and multicore cache hierarchies.

Check

A block of 24 instructions with a 6-long dependence chain runs on a 6-wide core with a 224-entry window and 2 bypass stages.

(a)

Dataflow-limited IPC?

(b)

Wake-up comparators?

(c)

Bypass paths?

Check

A 5-slot VLIW filling 1.8 slots per word; a reduction on a unit of latency 6 starting 3 operations per cycle, with 4 registers per partial sum chain and 3 shared.

(a)

Code size factor?

(b)

Independent partial sums needed?

(c)

Registers when unrolled that many times?

Check

Threads run 10 cycles between misses of 150 cycles; coarse-grained switching costs 8 cycles.

(a)

Fine-grained threads to saturate?

(b)

Coarse-grained ceiling?

(c)

Utilization with 5 threads?

Check

An SMT core: two threads reaching IPC 1.3 alone and 2.1 together; a GPU-style core with 16 threads of 32 64-bit registers.

(a)

Throughput gain over one thread?

(b)

Each thread's fraction of its solo speed?

(c)

Register state for the 16 threads?

Check

L1 hits in 1 cycles, misses 0.03; L2 hits in 15, misses 0.4 locally; memory takes 180; 1.25 accesses per instruction.

(a)

AMAT?

(b)

L2 MPKI?

(c)

Stall cycles per instruction (no overlap)?

Check

A program: 12000 misses direct-mapped, 7000 fully associative, 4000 with an infinite cache; it also streams once through 16 MB with 64-byte lines.

(a)

Conflict misses?

(b)

Capacity misses?

(c)

Compulsory misses of the stream?

Check

A 16 KB cache misses 0.05; the power-law exponent is 0.55.

(a)

Predicted miss rate at 1024 KB?

(b)

By what factor did misses fall?

Check

A 512 × 512 double-precision matrix multiply, with a 32 KB cache.

(a)

Largest B with three B × B blocks fitting?

(b)

Traffic reduction at that B?

Check

10 independent misses of 180 cycles each, overlapping 6 at a time; a loop of 40 cycles per iteration.

(a)

Stall cycles?

(b)

Prefetch distance in iterations?

Check

Way prediction 0.8 accurate (hits of 1 or 3 cycles); a direct-mapped cache missing 0.09, 0.45 conflicts, a victim cache catching 0.5 of them.

(a)

Average hit time?

(b)

New miss rate?

Check

A single cache hits in 1 cycles and misses 0.04 with a 200-cycle penalty. Adding an L2 (hit 12 cycles, local miss rate 0.5) in front of memory:

(a)

AMAT without the L2?

(b)

Speedup of memory access with it?

Check

A 4-wide core averaging 30 cycles per instruction in flight, with a 256-entry window, 32 architectural registers, 0.75 of instructions writing one.

(a)

Sustainable IPC?

(b)

Physical registers?

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.