What phenomenon occurs when software instructions cause the CPU to fetch and execute instructions across a conditional branch that turns out to be wrong, requiring the pipeline to be emptied?

Answer and explanation

Correct answer: C. Pipeline flush

  1. Step 1: Modern processors use branch predictors to guess whether a conditional jump (if-else, loop) will be taken so the pipeline can fetch upcoming instructions speculatively.
  2. Step 2: When a branch is mispredicted, all speculatively fetched instructions in flight are invalid; the CPU must execute a pipeline flush, discarding partial work and restarting fetch at the correct address.
Answer
Pipeline flush
Why not the others: 'Cache thrashing' Cache thrashing occurs when multiple memory addresses repeatedly overwrite one another in a cache due to poor spatial or temporal locality; 'Stack overflow' A stack overflow occurs when a program exhausts its allocated call stack space, typically caused by infinite recursion; 'Memory leak' A memory leak occurs when an application fails to release dynamically allocated heap memory after it is no longer needed.

Practise more Computer Architecture and Hardware.

Free questions with an explanation for every one, and full timed General Knowledge mock tests.