GATE Computer ScienceHardGATE CS (PYQ pattern)
A 5-stage pipeline with full forwarding has a base CPI of 1. 30% of instructions are loads and half of the loads are immediately followed by a dependent instruction, costing 1 stall cycle. 20% of instructions are branches, 60% of them are taken, and a taken branch costs 2 stall cycles. The average CPI is:
- A. 1.55
- B. 1.39
- C. 1.70
- D. 1.27
Correct answer: B. 1.39
CPI = 1 + 0.3 × 0.5 × 1 + 0.2 × 0.6 × 2 = 1 + 0.15 + 0.24 = 1.39. Ignoring the fractions that actually stall gives 1.70, and charging taken branches only 1 cycle gives 1.27.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- A 4-way set-associative cache of 64 KB uses 32-byte blocks and 32-bit physical addresses. Each block has one valid bit and one dirty bit…
- A processor has an L1 hit time of 1 cycle and an L1 miss rate of 10%. An L2 cache has a hit time of 10 cycles and a local miss rate of…
- The 32-bit word 0xC1D80000 is interpreted as an IEEE 754 single-precision number. Its value is:
- An 8-bit ALU adds the two's complement numbers 0x9C and 0xB5. After the addition the carry (C), overflow (V) and sign (N) flags are…
- A disk delivers 4,096,000 bytes/s to memory through a DMA controller in cycle-stealing mode, one 32-bit word at a time. Each word steals…
- Six instructions execute in program order: I1: LW R1, 0(R2) I2: ADD R3, R1, R4 I3: SUB R4, R3, R2 I4: SW R3, 4(R1) I5: AND R1, R4, R3 I6…