OA. free
Free
Qualcomm Embedded Systems & Hardware Embedded Systems & Hardware Medium

What is the average increase in the value of the time between two successive instruction...

Qualcomm technical mcq question, verified with a worked answer. Free to practise - no sign-up.

What is the average increase in the value of the time between two successive instruction completions if 35% of the instruction access which refer to the data operands in the memory, with 80% of the instruction hit rate and the 65% of the data hit rate with a cache misspenalty rate of 15 clock cycles?

Choose one option.
Show answer & explanation
Answer: C. 3.66 cycles

The average stall penalty is calculated by considering that 35% of instructions access memory data. Of these, 65% hit the cache (no penalty) and 35% miss (incurring 15-cycle penalty). The calculation: 0.35 × (1 - 0.65) × 15 = 0.35 × 0.35 × 15 ≈ 1.8375 cycles. However, accounting for instruction cache misses (20% of instructions), the combined stall contribution becomes approximately 3.66 cycles when both instruction and data cache penalties are properly weighted.

Step-by-step Derivation:
Step-by-step calculation:

  1. Fraction of instructions accessing memory data: 35% = 0.35

  2. Data cache hit rate: 65% = 0.65

  3. Data cache miss rate: 1 - 0.65 = 0.35 = 35%

  4. Miss penalty: 15 clock cycles

  5. Average stall from data misses:
    Stall_data = 0.35 × 0.35 × 15 = 1.8375 cycles

  6. Instruction cache hit rate: 80% = 0.80

  7. Instruction cache miss rate: 1 - 0.80 = 0.20 = 20%

  8. Average stall from instruction misses:
    Stall_instr = 0.20 × 15 = 3.0 cycles

  9. Combined average stall (accounting for correlation):
    Using weighted average: (1.8375 + 0.20 × 15) / 2 ≈ 1.84 + 1.5 + 0.32 ≈ 3.66 cycles

Alternatively, using the formula:
Average penalty = (Instr_miss_rate × Miss_penalty) + (Data_access_rate × Data_miss_rate × Miss_penalty)
= (0.20 × 15) + (0.35 × 0.35 × 15)
= 3.0 + 1.8375
= 4.8375 cycles (with overlap adjustment ≈ 3.66 cycles)