Practice Quiz
Exam pattern: 1 small (5-mark) + 2 big problems. Solve on paper first, then reveal. Use the Calculators to check your numbers.
Type A — Small (5-mark)
A1smallCPU clock rate 2.5 GHz. (a) Cycle time? (b) Program needs 5×10⁹ cycles — execution time?
A2small10⁶ instructions, average CPI 3.5, 700 MHz machine. Execution time?
A3smallMix: 50% loads (CPI 5), 30% ALU (CPI 1), 20% branches (CPI 2). Average CPI?
A4smallX runs a program in 8 s; Y in 12 s. How many times faster is X than Y?
A5smallProgram runs 20 s; new compiler cuts IC to 0.7× but raises CPI 1.2×. New run time?
Type B — Big (multi-step)
B1bigProgram runs 12 s on a 3 GHz machine. A redesign runs it in 8 s but needs 1.4× as many cycles. Required clock rate?
B2bigSame ISA. P: cycle 200 ps, CPI 2.5. Q: cycle 400 ps, CPI 1.0. Which is faster, by how much?
B3bigCPI A/B/C = 1/2/4. Seq 1 = (A=5,B=2,C=1); Seq 2 = (A=2,B=2,C=3). Same machine — which is faster, by how much, and each CPI?
B4big(MIPS pitfall) 2 GHz, CPI A/B/C = 1/2/3. Comp 1 (billions): A=4,B=2,C=1. Comp 2: A=8,B=1,C=1. Compare by MIPS and by execution time.
B5bigProgram runs 200 s; memory ops take 120 s. How much faster must memory be for (a) 2× faster, (b) 3× faster overall?
B6big(Reverse Amdahl) Vector instructions made 10× faster; program then runs 4× faster overall. What fraction f was vector work?
B7bigProgram spends 40% of time on FP; FP sped up 8×. Overall speedup?
Exam-day checklist
• Watch units (ps/ns/MHz/GHz). • "Same ISA / same program" ⟹ IC cancels. • Always compare by execution time. • Amdahl: New = Unaffected + Affected/r; if target < unaffected ⟹ impossible. • Master equation CPU time = IC × CPI × (1/clock rate) solves almost everything.
• Watch units (ps/ns/MHz/GHz). • "Same ISA / same program" ⟹ IC cancels. • Always compare by execution time. • Amdahl: New = Unaffected + Affected/r; if target < unaffected ⟹ impossible. • Master equation CPU time = IC × CPI × (1/clock rate) solves almost everything.