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" โŸน\Longrightarrow IC cancels. โ€ข Always compare by execution time. โ€ข Amdahl: New=Unaffected+Affectedr\text{New} = \text{Unaffected} + \frac{\text{Affected}}{r}; if target < unaffected โŸน\Longrightarrow impossible. โ€ข Master equation CPUย time=ICร—CPIร—1clockย rate\text{CPU time} = \text{IC} \times \text{CPI} \times \frac{1}{\text{clock rate}} solves almost everything.