InterviewStack.io LogoInterviewStack.io

Concurrency, Synchronization & Deadlock Questions

Coordinating concurrent execution against shared state: mutexes, semaphores, condition variables, spinlocks, and atomic operations, plus the problems they solve and cause. Covers race conditions, critical sections, the classic deadlock conditions and prevention/avoidance strategies, priority inversion, and livelock at the OS level.

EasyTechnical
46 practiced

Explain deadlock and list the four Coffman conditions (mutual exclusion, hold-and-wait, no-preemption, circular-wait). Describe three practical strategies to prevent or recover from deadlocks in a multithreaded application.

HardSystem Design
47 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.

MediumTechnical
50 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.

HardSystem Design
57 practiced

Design a distributed job scheduler that dispatches jobs to worker nodes running tasks concurrently. Explain how you will handle worker failures, job leasing, at-least-once vs exactly-once execution semantics, leader election, and how concurrency at the worker should be controlled.

EasyTechnical
57 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 all 43 Concurrency, Synchronization & Deadlock interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.