Medium ●●

📈 Performance: CPI, MIPS, Amdahl

Why it matters: Short numeric questions that also underpin pipeline and cache problems.

Subtopics

Each subtopic has its own page: idea, why, how, example, play, check. Mark each one understood when it clicks. 0 of 4 done.

Formulas

CPU time
T = IC × CPI / f_clock = IC × CPI × t_clk
Average CPI
CPI = Σ (fraction_i × CPI_i)
MIPS
MIPS = f_clock / (CPI × 10⁶) = IC / (T × 10⁶)
Amdahl
Speedup = 1 / ((1 − f) + f / s)
Max possible speedup
S_max = 1 / (1 − f)
Speedup of A over B
S = T_B / T_A

What GATE asks from this

Question types seen repeatedly in past papers. More stars means more frequent.

★★★
Average CPI / execution time from an instruction mix
Given % of ALU, load/store, branch and their cycles, compute CPI or time for IC instructions.
★★★
Compare two designs
e.g. higher clock but higher CPI; or enhancement on part of the instructions (Amdahl).
★★★
MIPS rating
Compute from CPI and clock.

Ratings are approximate, based on recurring patterns in past GATE CSE papers.

Previous year questions

3 real questions from the official GATE CSE papers (2014 to 2025), newest first, each with the official answer key and a worked solution. Questions are the property of the GATE organising institutes; this copy is for your personal study.

3 questions · 0 correct of 0 attempted · marks 0 / 6

Year:
GATE 2025 CS2 · Q61NAT2 marks
An application executes 6.4 × 108 instructions in 6.3 seconds. There are four types of instructions: Branch (CPI 2, 2.25 × 108 instructions), Load (CPI 5, 1.20 × 108), Store (CPI 4, 1.65 × 108), Arithmetic (CPI 3, 1.30 × 108). The duration of a clock cycle in nanoseconds is ______ (rounded off to one decimal place).
GATE 2024 CS1 · Q55NAT2 marks
The baseline execution time of a program on a 2 GHz single core machine is 100 ns. The code corresponding to 90% of the execution time can be fully parallelized. The overhead for using an additional core is 10 ns when running on a multicore system. Assume that all cores run their share of the parallelized code for an equal amount of time. The number of cores that minimize the execution time of the program is ______.
GATE 2014 Set 1 · Q55NAT2 marks
Consider two processors P1 and P2 executing the same instruction set. Assume that under identical conditions, for the same input, a program running on P2 takes 25% less time but incurs 20% more CPI (clock cycles per instruction) as compared to the program running on P1. If the clock frequency of P1 is 1 GHz, then the clock frequency of P2 (in GHz) is ______.

Extra practice (GATE-style)

More questions in the same formats, each with a full solution. These are original questions written to follow the patterns above, not past-paper questions.

4 questions · 0 correct of 0 attempted · marks 0 / 7

Q1NAT2 marks
A part of a program that takes 40% of the execution time is made 4 times faster. The overall speedup (two decimals) is ____.
Q2NAT2 marks
Instruction mix: 40% ALU (CPI 1), 35% loads (CPI 3), 15% stores (CPI 2), 10% branches (CPI 4). Clock = 2 GHz. The time in seconds to run 10⁹ instructions is ____.
Q3NAT2 marks
Machine M1: 2 GHz, CPI 1.5. Machine M2: 3 GHz, CPI 2.5. Same program, same instruction count. By what factor is M1 faster than M2? (two decimals) ____.
Q4MCQ1 mark
MIPS is a misleading measure of performance mainly because

Common traps

Convert GHz/MHz and ns carefully.
Amdahl: f is a fraction of original execution time, not of instruction count.