ITPEC FE Morning October 2019 Question 10

A CPU has a clock frequency of 2.0 GHz. When the instructions consist of three types, as shown in the table below, what is the approximate CPU performance in MIPS?

TypeExecution time (clocks)Frequency of appearance (%)
Instruction 11540
Instruction 21020
Instruction 31040

Explanation

167 MIPS — find the average number of clocks per instruction, then divide the clock rate by it.

  • •Average CPI: 15 × 0.4 + 10 × 0.2 + 10 × 0.4 = 6 + 2 + 4 = 12 clocks
  • •Clock rate: 2.0 GHz = 2,000 million clocks per second
  • •Performance: 2,000 ÷ 12 ≈ 166.7 million instructions per second, about 167 MIPS

Answer (c)

Why not others:

  • •(a) 16.7 — a factor-of-ten slip in the clock, 200 MHz instead of 2,000 MHz
  • •(b) 120 — would need an average of about 16.7 clocks per instruction, but every instruction takes 10 or 15 clocks, so any average lies between 10 and 15, that is 133 to 200 MIPS
  • •(d) 200 — 2,000 ÷ 10: uses 10 clocks as the average, ignoring that the 15-clock Instruction 1 makes up 40% of the mix

Key rule: MIPS = clock rate in MHz ÷ average CPI, with the CPI weighted by each instruction's frequency of appearance.

Computer Component · AI-written, may contain errors

This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.