The architecture questions worth preparing, from caches and MESI to pipeline hazards, with short answers and worked examples you can practise aloud.
The computer architecture interview questions below cover the fundamentals, the memory hierarchy, cache coherence, and pipelines. Expect to trace something, not just define it: a cache line moving through MESI states, a load stalling a pipeline, a miss rate turning into cycles. Each of the 11 questions has a short answer; three are worked through step by step so you can practise on paper.
Fundamentals
1. How do RISC and CISC differ, and does it still matter?
RISC means load/store, simple instructions and mostly fixed-length encodings (ARM, RISC-V); x86 is the CISC example. A strong answer adds that the line has blurred: modern x86 cores break instructions into micro-operations, buffer them and schedule them out of order, so the label says less than it used to.
2. What does Amdahl's law tell you?
Speedup = 1 / ((1 − p) + p/s), where p is the fraction that improves and s is its speedup. If 80% of a program runs in parallel on 8 cores: 1 / (0.2 + 0.1) ≈ 3.3×. Even with infinite cores the limit is 1 / 0.2 = 5×. The point to say out loud: the serial part sets the ceiling.
Memory hierarchy
3. Compare direct-mapped, set-associative and fully associative caches.
Direct-mapped is simplest and fastest to look up but suffers conflict misses. Fully associative has the best miss rate but only works for small structures. Set-associative sits between them; more ways cut misses at the cost of power, area and lookup time. Add write-back (dirty lines reach memory on eviction) versus write-through.
4. Calculate average memory access time. (worked example)
AMAT = hit time + miss rate × miss penalty, applied level by level. Take illustrative numbers: L1 hit 4 cycles, L1 miss rate 5%, L2 hit 12 cycles, L2 local miss rate 20%, memory 200 cycles.
- L1 miss penalty = 12 + 0.2 × 200 = 52 cycles
- AMAT = 4 + 0.05 × 52 = 6.6 cycles
Likely follow-up: which would you improve? Halving the L1 miss rate gives 4 + 0.025 × 52 = 5.3 cycles. Cutting L2 hit time from 12 to 8 gives 4 + 0.05 × 48 = 6.4. Here the L1 miss rate matters more; say why.
5. What is a TLB, and what does a VIPT cache buy you?
The TLB caches virtual-to-physical translations; a miss triggers a page-table walk (hardware on x86, the OS on some other architectures). A virtually indexed, physically tagged cache looks up the set while the TLB translates, then checks the physical tag. The catch: to avoid aliasing, its size is capped at page size times associativity.
Cache coherence and memory ordering
If you came for cache coherence interview questions, prepare these four, and draw each one.
6. Walk me through MESI. (worked trace)
States: Modified (only copy, dirty), Exclusive (only copy, clean), Shared (clean, may be in other caches), Invalid. Two cores, one line X:
- Event — Core A — Core B
- A reads X, nobody else has it — E — I
- B reads X — S — S
- A writes X (invalidates B's copy) — M — I
- B reads X (A supplies data, memory updated) — S — S
Why Exclusive exists: a read then a write to unshared data needs no second bus transaction, because E moves to M silently. MOESI adds Owned, which lets a cache share a dirty line and supply the data without writing it back first.
7. Snooping or directory: when would you choose each?
Snooping broadcasts every request: fast if bandwidth allows, but it scales poorly. A directory tracks who holds each line and sends point-to-point messages: less traffic, more latency. That trade is why many large systems use directories.
8. Two threads update separate counters and it runs slowly. Why?
False sharing. The counters sit on one cache line, so each write forces the whole line to move between cores even though the data is independent. Pad or align each counter to its own line, at some memory cost.
9. What is the difference between coherence and consistency?
Coherence is about one address; consistency is about ordering across addresses. Even x86, which has a strong model, can let a later load complete before an earlier store; weaker models reorder more, and code relies on fence instructions such as mfence on x86 or dmb on ARM.
Pipelines and out-of-order execution
10. Show a hazard that forwarding cannot fix. (worked example)
In the classic five-stage pipeline (IF, ID, EX, MEM, WB):
lw x1, 0(x2)
add x3, x1, x4The loaded value exists only after MEM, too late for add in EX, so the interlock inserts one bubble even with forwarding. A compiler can hide it with an independent instruction in between. Then name structural hazards (two instructions, one resource) and control hazards (branches).
11. How do branch prediction, register renaming and the reorder buffer fit together?
A two-bit counter must be wrong twice before flipping, so a loop branch mispredicts once per exit, not twice. A miss typically costs 10 to 20 cycles on modern long pipelines. Renaming removes WAR and WAW dependencies but not true RAW ones. The reorder buffer commits in program order, giving precise exceptions and a clean flush of wrong-path work.
A two-week plan
- Days 1–4: caches. Redo the AMAT calculation with your own numbers until it takes under two minutes.
- Days 5–8: coherence. Draw MESI from memory; trace false sharing.
- Days 9–12: pipelines, hazards and the reorder buffer.
- Days 13–14: timed mock rounds, out loud.
For the rest of the screen, see our CS fundamentals questions, RTOS questions for embedded roles, and the technical round guide. During the interview, Verve AI's Interview Copilot listens and shows suggestions only you can see, drawing on the resume and notes you add to its Knowledge Base.
Sources
- RISC characteristics, ARM and RISC-V examples, blurred RISC/CISC line: https://en.wikipedia.org/wiki/Reduced_instruction_set_computer
- Micro-operations buffered and rescheduled in modern CISC processors: https://en.wikipedia.org/wiki/Micro-operation
- Amdahl's law formula and limit: https://en.wikipedia.org/wiki/Amdahl%27s_law
- Cache placement trade-offs, write-back vs write-through, VIPT size limit: https://en.wikipedia.org/wiki/CPU_cache
- AMAT formula and multi-level form: https://en.wikipedia.org/wiki/Average_memory_access_time
- TLB, page walk, hardware vs software-managed: https://en.wikipedia.org/wiki/Translation_lookaside_buffer
- MESI states and transitions, Exclusive saves a bus request: https://en.wikipedia.org/wiki/MESI_protocol
- MOESI Owned state: https://en.wikipedia.org/wiki/MOESI_protocol
- Snooping vs directory, larger systems use directories: https://en.wikipedia.org/wiki/Cache_coherence
- False sharing and padding: https://en.wikipedia.org/wiki/False_sharing
- x86 store-load reordering, barrier instructions: https://en.wikipedia.org/wiki/Memory_ordering
- Five-stage pipeline, load-use interlock: https://en.wikipedia.org/wiki/Classic_RISC_pipeline
- Structural and control hazards: https://en.wikipedia.org/wiki/Hazard_%28computer_architecture%29
- Two-bit counters, misprediction penalty 10 to 20 cycles: https://en.wikipedia.org/wiki/Branch_predictor
- Renaming removes WAR and WAW: https://en.wikipedia.org/wiki/Data_dependency
- Reorder buffer, in-order commit, precise exceptions, flush on misprediction: https://en.wikipedia.org/wiki/Re-order_buffer
Ryan
CEO of Verve AI








