Apple · CS Fundamentals
Answer OoO, caches, and memory-system questions
TrueInterview
October 7, 2026 · 2 min read
You are being interviewed for a CPU/DV position. Explain each of the following computer architecture topics clearly, adding a small worked example where it helps:
- Out-of-order (OoO) execution basics: Outline the main structures found in an OoO core—such as the ROB, reservation stations/issue queue, and load-store queue—and trace how an instruction moves through them.
- Branch prediction:
- Describe how a gshare predictor operates, covering the indexing, global history register, and counter behavior.
- For a given branch result, explain how to update both the pattern history table's 2-bit counters and the global history register.
- Register renaming / RAT tracing: Given a short sequence of instructions that use architectural registers, explain how the rename map table (RAT) should be updated and what mapping results at the end. (You do not need a particular ISA; assume every destination register gets a fresh physical register.)
- VLIW: Define VLIW and contrast it with superscalar out-of-order designs. Compare the complexity placed on the compiler versus the hardware.
- Cache coherence: What issue does cache coherence address? Give a high-level comparison of common protocols such as MSI, MESI, and MOESI.
- Load/store subsystem questions:
- What functions do the store buffer and load-store queue perform?
- What does it mean for a load or store to be speculative?
- When are cache tags based on virtual addresses, and when are they based on physical addresses?
- Copy-on-write (COW) after
fork(): In an OS that providesfork(), how can the parent and child initially share the same physical pages, and how does the system detect a write that should trigger copy-on-write? Which exception or fault is raised, and what does its handler do? - Cache indexing math: For a cache with a given capacity, block size, and associativity, show how to compute:
- the number of sets
- the index bit count
- the block offset bit count
- the tag bit count, assuming a 32-bit address
- VIPT caches and aliasing: For a virtually indexed, physically tagged cache, explain why aliasing can happen and describe the techniques designs use to prevent it, such as page coloring, size constraints, or way prediction.
- Async FIFO: What problem is an asynchronous FIFO intended to solve? Outline the usual gray-code pointer approach and why it is required.
Overview: This question tests core computer-architecture and system-level knowledge, including out-of-order execution structures, gshare branch prediction mechanics, register renaming and RAT tracing, VLIW versus superscalar tradeoffs, cache coherence protocols, load/store subsystem behavior, copy-on-write after fork, cache indexing arithmetic, VIPT aliasing, and asynchronous FIFO design, and it falls under Software Engineering Fundamentals. It is often asked because it examines a candidate's understanding of microarchitecture and operating systems, performance reasoning, and ability to explain low-level microarchitectural and system concepts and their interactions without requiring complete ISA-specific implementations.