← Google Interview Insights

Google·Software Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
Jun 2026

Summary

Google system design round, got hit with a cache controller question and had to figure out the design on the spot. Not a lot of context in the prompt so you kind of have to drive the whole thing yourself.

Questions Asked (1)

Q1

Design a cache controller.

System DesignTechnical Trade-offs
Author's notes

Deceptively open-ended.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, such as cache size, associativity, replacement policy, and performance goals. Then outline a high-level design, diving into key components like tag store, data store, and control logic, while discussing trade-offs and edge cases.

Pro tip: Demonstrate awareness of real-world constraints like power consumption, area, and timing, and relate them to software implications such as cache coherence and consistency models.

1. Clarify Requirements

Ask questions to understand the scope: cache size, block size, associativity, write policy, replacement policy, and performance targets. Confirm whether it's for a CPU, GPU, or distributed system.

2. High-Level Design

Sketch the main components: tag array, data array, valid/dirty bits, replacement logic, and interface with memory. Explain how a request flows through the cache.

3. Detailed Design & Trade-offs

Discuss design choices for each component, such as direct-mapped vs. set-associative, LRU vs. random replacement, write-through vs. write-back. Analyze trade-offs in terms of hit rate, latency, and complexity.

4. Handle Edge Cases & Optimizations

Address scenarios like cache misses, evictions, coherence in multi-core systems, and optimizations like prefetching or multi-level caches.

5. Summarize & Evaluate

Recap the design, highlight key decisions, and suggest how to evaluate performance (e.g., simulation, metrics like AMAT).

Key Points to Mention

  • Cache organization: direct-mapped, set-associative, fully associative
  • Replacement policies: LRU, FIFO, random, and their trade-offs
  • Write policies: write-through vs. write-back, write-allocate vs. no-write-allocate
  • Cache coherence protocols (e.g., MESI) for multi-core systems
  • Performance metrics: hit rate, miss penalty, AMAT
  • Hardware/software interface: memory consistency models, impact on programming

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.