SCENE 1/5SAA-101 · Predicted exam
PROBLEM 1
≈17
Pipelining & Amdahl
PROBLEM 2
≈22
Caches & memory hierarchy
PROBLEM 3
≈23
Distributed system design
Three problems · step-by-step marking scheme + pitfalls for every part
Exam-prep aid, not a leaked paper — marks are traced back to the method.
SCENE 2/5 · P1Execution time & pipelining
(a) P1 = 0.150 s vs P2 = 0.200 s → speedup 0.200 ÷ 0.150 = 1.33×[4]
(b) Pipeline drops CPI 3.8 → ≈1.30 → 3.8 ÷ 1.30 = 2.92×, ≈77% of the 3.8× ceiling[9]
Speedup = CPIserial ÷ CPIpipeline = 2.92×
Pitfalls: clock rate alone (3.0 vs 2.0 GHz) misleads — use I × CPI ÷ f; penalize only the 50% of branches that are taken.
SCENE 3/5 · P1(c)Amdahl
A unit with f = 25% of runtime becomes 5× faster → S = 1 ÷ (0.75 + 0.25 ÷ 5) = 1 ÷ 0.80 = 1.25×[1]
Ceiling as s → ∞: Smax = 1 ÷ 0.75 ≈ 1.33× — no change to that unit can exceed this[2]
S = 1 ÷ (1 − f + fs)
Both the actual 1.25× and the asymptotic ceiling 1.33× are required for full marks.
SCENE 4/5 · P2Caches & memory hierarchy
Setup: 4 MiB memory = 22 address bits; 32 B lines → offset 5 bits
(a) L1 32 KiB, 4-way: 1024 lines → 256 sets = off 5 · idx 7 · tag 10; L2 1 MiB direct: off 5 · idx 15 · tag 2[6]
(c) Trace A B A D E A E D, a 1024-line stride → all 4 hit the same L1 set → LRU conflict misses[6]
(d) Write-through: memory updated immediately · Write-back: on eviction of a dirty line[4]
AMAT = thit + miss-rate × tmiss
Pitfalls: swapping tag and index; forgetting to divide line count by the associativity (4) before the log2.
SCENE 5/5 · P3Distributed design & fault tolerance
50,000students
→
CDN + WAFedge shield
→
Load balanceractive + warm standby
→
9 statelessservers · 2,000 req/s
→
Cache + DB≈90% reads
(a) Quantified NFRs: 50k students · 2,000 req/s · ≈90% reads · RPO = 0[4]
(b) Every box quantified, every arrow labelled [6]
(c) Quorum w = r = 2 survives one replica failure; LB health-checked failover [6]
w = r = 2 · RPO = 0 — quorum across three replicas
Pitfall: unquantified boxes or unlabelled arrows lose most of the part (b) marks.
0:00 / 0:56