← Citi Interview Insights

Citi·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Citi systems fundamentals round, basically a quickfire gauntlet covering OS concepts, networking, and browser internals back to back. No real breathing room between topics, which made it harder than any single question would have been on its own.

Questions Asked (4)

Q1

What is the difference between a process and a thread, and what overhead is involved when the CPU switches between them?

System DesignTechnical Trade-offs
Author's notes

Knew this one cold.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clearly defining processes and threads, emphasizing that processes are independent execution units with separate address spaces, while threads are lightweight units within a process sharing the same address space. Then explain the overhead of CPU switching between them, distinguishing between context switch costs for processes (higher due to TLB flush, cache invalidation) and threads (lower due to shared memory). Finally, relate this to trade-offs in system design, such as choosing threads for concurrency vs. processes for isolation.

Pro tip: Mention that while thread context switches are cheaper, they still incur kernel overhead, and in some cases (e.g., user-level threads), switching can be extremely fast but lacks kernel awareness. This shows depth and awareness of real-world performance considerations.

1. Define Process

Explain that a process is an independent program in execution with its own memory space, resources, and state. It is the unit of resource allocation and protection.

2. Define Thread

Describe a thread as a lightweight unit of execution within a process, sharing the process's memory and resources but having its own stack, registers, and program counter.

3. Compare Overhead of Switching

Discuss the overhead when the CPU switches between processes vs. threads. For processes: higher overhead due to TLB flush, cache invalidation, and full context save/restore. For threads: lower overhead because they share the same address space, so no TLB flush or cache invalidation is needed.

4. Relate to Trade-offs

Explain the implications: processes offer isolation and fault tolerance but are heavier; threads offer faster communication and context switching but require careful synchronization and can affect each other.

5. Conclude with Practical Relevance

Summarize how this knowledge informs design decisions, such as using threads for I/O-bound tasks and processes for CPU-bound tasks requiring isolation.

Key Points to Mention

  • Processes have separate address spaces; threads share the same address space within a process.
  • Context switch between processes involves saving/restoring more state (e.g., memory maps, file descriptors) and flushing TLB, leading to higher overhead.
  • Thread context switch is faster because it only saves/restores registers and stack pointer, and no TLB flush is needed.
  • Threads within the same process can communicate more efficiently via shared memory, but require synchronization to avoid race conditions.
  • Processes provide better isolation and security; a crash in one process does not affect others, whereas a thread crash can bring down the entire process.
  • The choice between processes and threads depends on the application's needs for concurrency, isolation, and performance.

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

Q2

What is the difference between concurrency and parallelism, and can you describe a common concurrency bug and how you'd prevent it?

System DesignTechnical Trade-offs
Author's notes

Concurrency is about structure, parallelism is about execution, said that fine.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clearly defining concurrency and parallelism, emphasizing that concurrency is about dealing with multiple tasks at once (structure) while parallelism is about executing multiple tasks simultaneously (execution). Then, describe a common concurrency bug like a race condition or deadlock, and explain prevention strategies such as using locks, atomic operations, or design patterns. Finally, relate it to a real-world scenario, ideally in a financial systems context like Citi, to show practical understanding.

Pro tip: Mention that concurrency bugs are often non-deterministic and hard to reproduce, so prevention through design (e.g., immutability, message passing) is more effective than debugging. Also, highlight the importance of testing under load and using tools like thread sanitizers.

1. Define concurrency vs. parallelism

Explain that concurrency is about managing multiple tasks that can be interleaved, often on a single core, while parallelism is about executing multiple tasks simultaneously on multiple cores. Use analogies if helpful, like a juggler (concurrency) vs. multiple jugglers (parallelism).

2. Describe a common concurrency bug

Choose a well-known bug such as a race condition (e.g., two threads incrementing a shared counter) or deadlock (e.g., two threads waiting for each other's locks). Briefly explain how it occurs and its potential impact.

3. Explain prevention strategies

Discuss techniques to prevent the bug: for race conditions, use locks, atomic variables, or synchronization; for deadlocks, use lock ordering, timeouts, or avoid nested locks. Emphasize design-level solutions like immutability or message passing.

4. Relate to real-world context

Connect the concepts to a financial or high-performance system, such as handling concurrent transactions in banking. Mention how Citi might value robust concurrency control for data consistency and low-latency trading.

5. Summarize and show trade-offs

Conclude by noting that concurrency and parallelism are not mutually exclusive and involve trade-offs between performance, complexity, and correctness. Highlight the importance of choosing the right model for the problem.

Key Points to Mention

  • Concurrency is about structure (dealing with many things at once), parallelism is about execution (doing many things at once).
  • Race conditions occur when multiple threads access shared data without synchronization, leading to unpredictable results.
  • Deadlocks happen when threads wait indefinitely for resources held by each other, often due to circular dependencies.
  • Prevention: use locks, atomic operations, thread-safe data structures, and design patterns like actor model or immutable objects.
  • Testing and tooling: use stress tests, thread sanitizers, and static analysis to detect concurrency issues.
  • In financial systems, concurrency bugs can cause data corruption or financial loss, so rigorous design and testing are critical.

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

Q3

Compare TCP and UDP. When would you choose one over the other, and how do flow control and congestion control work in TCP?

System DesignTechnical Trade-offs
Author's notes

TCP vs UDP I can do in my sleep.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining TCP and UDP and their core differences, then explain when to choose each based on application requirements. Finally, dive into TCP's flow control and congestion control mechanisms, highlighting their importance in reliable data transfer.

Pro tip: Relate the concepts to real-world scenarios, such as financial transactions (TCP) vs. live streaming (UDP), to show practical understanding. Also, mention that TCP's congestion control is crucial for network stability, which is particularly relevant in high-frequency trading environments like Citi's.

1. Define TCP and UDP

Briefly describe TCP as connection-oriented, reliable, and ordered, and UDP as connectionless, unreliable, and unordered. Mention their respective headers and overhead.

2. Compare key characteristics

Contrast reliability, ordering, speed, overhead, and use cases. Highlight that TCP guarantees delivery and order, while UDP is faster and more efficient for real-time applications.

3. Explain when to choose each

Discuss scenarios: choose TCP for applications requiring reliability (e.g., web, email, file transfer) and UDP for real-time, low-latency applications (e.g., VoIP, video streaming, gaming).

4. Describe TCP flow control

Explain how TCP uses sliding window and receiver advertisements to prevent overwhelming the receiver. Mention that it ensures the sender doesn't send more data than the receiver can handle.

5. Describe TCP congestion control

Explain algorithms like slow start, congestion avoidance, fast retransmit, and fast recovery. Mention how TCP adjusts sending rate based on network congestion to avoid collapse.

Key Points to Mention

  • TCP is connection-oriented with a three-way handshake, while UDP is connectionless.
  • TCP provides reliability through acknowledgments, retransmissions, and sequencing; UDP does not.
  • Flow control in TCP uses a sliding window mechanism to manage receiver buffer.
  • Congestion control in TCP includes slow start, congestion avoidance, and algorithms like Reno or CUBIC.
  • UDP is preferred for real-time applications where speed and low latency are critical, and occasional packet loss is acceptable.
  • TCP is used for applications that require data integrity and order, such as HTTP, FTP, and SMTP.

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

Q4

Walk through everything that happens from typing a URL into a browser to the page being fully rendered on screen.

System DesignAPI & Integrations
Author's notes

Classic question but the scope is massive.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Structure your answer as a clear, layered narrative that follows the request from the browser through DNS, TCP/TLS, HTTP, server processing, and rendering. Emphasize the key decision points and protocols at each stage, and connect them to broader system design and integration concerns relevant to a financial institution like Citi.

Pro tip: Highlight security and performance considerations (e.g., HTTPS, caching, CDNs, load balancers) and tie them to Citi's need for reliable, low-latency, and secure systems. This shows you think beyond the textbook flow and understand enterprise constraints.

1. URL Parsing and DNS Resolution

Explain how the browser parses the URL, checks its cache, and resolves the domain to an IP address via DNS (recursive resolver, root, TLD, authoritative). Mention DNS caching and TTL.

2. Connection Establishment and Request

Describe TCP three-way handshake, TLS handshake for HTTPS, and then the HTTP request being sent. Include details like HTTP methods, headers, and cookies.

3. Server-Side Processing and Response

Cover how the request reaches the server (load balancer, reverse proxy, application server), how it's processed (API calls, database queries), and the HTTP response (status code, headers, body).

4. Browser Rendering Pipeline

Explain how the browser parses HTML, builds the DOM, fetches subresources (CSS, JS, images), constructs the CSSOM, and renders via layout, paint, and composite.

5. Post-Load Optimizations and Caching

Mention browser caching, service workers, and how subsequent requests may be served from cache. Also note performance metrics like First Contentful Paint and Time to Interactive.

Key Points to Mention

  • DNS resolution steps and caching (browser, OS, resolver)
  • TCP handshake and TLS negotiation for secure connections
  • HTTP request/response cycle, including headers, status codes, and cookies
  • Server-side architecture: load balancers, reverse proxies, application servers, databases
  • Browser rendering: DOM, CSSOM, render tree, layout, paint, composite
  • Caching mechanisms (HTTP cache, CDN, service workers) and performance optimization

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