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.

EasyTechnical
92 practiced
What is a thread pool? Explain benefits and trade-offs compared to spawning a new thread per task. Describe tuning considerations such as core pool size, maximum threads, queue capacity, rejection policies, and how task characteristics (CPU-bound vs IO-bound) influence sizing.
MediumTechnical
48 practiced
Describe and implement (pseudocode is fine) a bounded-buffer producer-consumer system that supports backpressure: when consumers are slower than producers, producers should be slowed or limited. Include at least two backpressure strategies (blocking, dropping, and signaling) and how you'd choose between them.
MediumSystem Design
51 practiced
Design an API and internal approach for cancellable tasks in a multithreaded service. How would you propagate cancellation, ensure resource cleanup, and handle cancellation of blocking I/O operations that are not interruptible by design?
HardSystem Design
45 practiced
Design a work-stealing scheduler for parallel tasks (like a ForkJoin framework). Describe the per-worker data structures, push/pop semantics, how stealing works atomically, and strategies to minimize contention and maximize locality.
EasyTechnical
55 practiced
How would you prevent UI blocking on the main thread across platforms: browser JavaScript, Android, and iOS? List concrete APIs or patterns (e.g., Web Workers, Kotlin coroutines, Grand Central Dispatch) and describe how you would update UI safely from background work.

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.