InterviewStack.io LogoInterviewStack.io

Concurrency and Multithreading Questions

Principles and practical techniques for concurrent execution and safe access to shared state across threads or execution contexts. Topics include main thread versus background threads, dispatching and scheduling work, synchronization primitives, locks, atomic operations, avoiding deadlocks and race conditions, designing thread safe data structures, reactive and event driven approaches, and platform specific tools such as Grand Central Dispatch and OperationQueue on iOS or coroutines and LiveData on Android. Evaluations focus on reasoning about correctness, performance trade offs, and methods to prevent UI blocking and ensure responsiveness.

HardSystem Design
0 practiced
Design a concurrency-safe memory allocator for a multithreaded application. Discuss strategies such as per-thread caches, global free lists, size classes, batching frees, and how to reduce contention and fragmentation while maintaining low latency.
HardSystem Design
0 practiced
Design an in-memory transactional system that uses optimistic concurrency control (OCC) for small transactions. Describe how you maintain versions, detect conflicts, validate at commit time, and scale validation across CPU cores when many transactions touch disjoint keys.
HardTechnical
0 practiced
Explain C++11 memory_order semantics: relaxed, acquire, release, acquire-release, and seq_cst. Provide a small code example that demonstrates a reordering that relaxed allows but acquire-release would prevent, and discuss performance trade-offs when choosing an ordering.
MediumSystem Design
0 practiced
Design a thread pool API for a server that must process both short-lived requests and occasional long-running tasks. Describe the public interfaces for submitting tasks, scaling workers, graceful shutdown, queue policies, and handling rejected tasks. Explain key design decisions.
HardTechnical
0 practiced
Explain priority inversion and design strategies to avoid it in real-time systems. Describe priority inheritance as a solution, its implementation implications, and show a code sketch of a mutex wrapper that supports priority inheritance semantics.

Unlock Full Question Bank

Get access to hundreds of Concurrency and Multithreading interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.