S430 of 55
0 XP
  1. Hook
  2. Problems

S4 · Problem set 5

Problem set 5: virtual memory, DRAM, vectors and GPUs

These problems cover lessons 24 to 29: TLB reach, page-table depth and translation cost, nested translation, virtually indexed caches and page faults, DRAM timing, bandwidth and refresh, misses in flight and NUMA, vector strip mining and peak rates, and GPU occupancy, divergence and coalescing.

Check

A TLB of 64 entries with 4 KB pages; a 57-bit address space with 221-byte pages and 8-byte entries.

(a)

TLB reach?

(b)

Page-table levels?

Check

Translation: TLB 0.5 ns, memory 80 ns, TLB hit rate 0.995, 5-level walks. And an 8-way VIPT L1 with 4 KB pages.

(a)

Average access time?

Write units the way you normally would: 1.5 ns, 1500 ps and 0.0015 µs are the same answer.

(b)

Largest alias-free L1?

Check

A flat page table for a 39-bit space with 212-byte pages and 8-byte entries; memory at 100 ns and page faults at 15 ms.

(a)

Flat table size?

(b)

Largest fault rate for at most 10% slowdown?

Check

2 channels of 64-bit DRAM at 4800 MT/s, with a timing of 40 cycles at a 2400 MHz clock.

(a)

Peak bandwidth?

(b)

The timing in nanoseconds?

Write units the way you normally would: 1.5 ns, 1500 ps and 0.0015 µs are the same answer.

Check

Row hit rate 0.35 (misses are conflicts), tCL = 13, tRCD = 16, tRP = 16 ns; refresh blocks 300 ns every 3.9 µs.

(a)

Average latency to first data?

Write units the way you normally would: 1.5 ns, 1500 ps and 0.0015 µs are the same answer.

(b)

Refresh overhead?

Check

A DRAM chip of 16 banks × 65536 rows × 1024 columns × 16 bits; bursts of 16 transfers at 4800 MT/s.

(a)

Capacity?

Write units the way you normally would: 1.5 Gbit, 1500 Mbit and 0.0015 Tbit are the same answer.

(b)

Burst time?

Check

A vector loop over 300 elements: MVL 64, 15 cycles of loop overhead and 60 of startup per strip, 2 chimes.

(a)

Strips?

(b)

Cycles per element?

Check

A chip of 12 cores at 2.4 GHz, each with 2 FMA unit(s) of 512 bits, on 32-bit numbers.

(a)

Lanes?

(b)

Peak rate?

Check

16 memory banks read at a stride of 2 words; a loop of 4 convoys over 256 elements on 4 lanes.

(a)

Banks used?

(b)

Cycles, ignoring startup?

Check

An SM with 65536 registers and room for 64 warps, a kernel using 64 registers per thread, a 350-cycle memory latency and 30 cycles of work per warp between accesses.

(a)

Warps that fit?

(b)

Warps needed to hide the latency?

Check

A warp splits with 10 threads on 12 instructions and the rest on 18; it also loads 4-byte words at a stride of 8.

(a)

Lane efficiency?

(b)

32-byte sectors touched?

Check

A GPU of 84 SMs × 64 FP32 lanes at 2 GHz, with 3.3 TB/s of memory bandwidth.

(a)

Peak FP32 rate?

(b)

FLOPs per byte needed to keep the arithmetic busy?

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.