KatInterview

CPU Microarchitecture and Memory System: Ten-Topic Review

System DesignModel answer
MediumModel answerSystem Designcomputer-architectureout-of-ordercaches

Last updated

Explain ten core architecture topics: OoO pipelines, gshare, register renaming, VLIW, coherence, load/store logic, COW, cache math, VIPT aliasing, and async FIFOs.

Imagine a technical screen for a CPU design or verification role. Explain each of the following topics clearly. Use a small worked example wherever it helps. You do not need a specific ISA.

  1. Out-of-order core. Name the main structures (reorder buffer, issue queue or reservation stations, load/store queue) and trace an instruction from fetch to retirement.
  2. gshare predictor. Explain how the table is indexed, what the global history register does, and how the 2-bit counters and history are updated after a branch resolves.
  3. Register renaming. Given a short sequence of instructions on architectural registers, show how the rename table (RAT) changes and give the final mapping. Assume every destination gets a fresh physical register.
  4. VLIW. Define it and contrast it with a superscalar out-of-order design, especially the split of complexity between compiler and hardware.
  5. Cache coherence. State the problem being solved and compare MSI, MESI and MOESI at a high level.
  6. Load/store subsystem. Describe the store buffer and the load/store queue, explain what "speculative" means for memory operations, and say when cache tags use virtual versus physical addresses.
  7. Copy-on-write after fork(). Explain how parent and child can share frames, how a write is detected, which fault occurs, and what the handler does.
  8. Cache index math. From capacity, block size and associativity, derive the number of sets, index bits, offset bits and tag bits for a 32-bit address.
  9. VIPT caches. Explain why aliasing can occur and how designs avoid it.
  10. Asynchronous FIFO. Say what problem it solves and outline the Gray-code pointer technique and why it is needed.

Hints

Hint 1

For each topic, lead with the invariant that makes it work (retire in order, SWMR, only one Gray-code bit changes) before naming structures.

Hint 2

For the numeric parts (RAT trace, cache math), read sources before writing the destination mapping, and check that tag + index + offset bits add up to the address width.

Hint 3

For VIPT, compare the number of index plus offset bits against the page-offset bits. For the async FIFO, ask what goes wrong when a multi-bit pointer is sampled by a clock that is not its own.