Concurrency Bugs: Race Conditions and Deadlocks
Concurrency Bugs: Race Conditions and Deadlocks
HardOperating System0% accepted
Identify and fix concurrency bugs in multi-threaded code. Cover race conditions, deadlocks, livelocks, starvation, and priority inversion. Analyze a given code snippet for thread safety issues.
Approach
Identify race conditions, deadlocks, livelocks in multi-threaded programs.
Input
Two threads do: x++; where x is shared global
Output
x++ is not atomic (read, increment, write); use atomic<int> or mutex to protect
More Operating System problems
Browse all coding problems →Scenarios & Expected Answers
Sign in to continue
Create a free account to view answers and mark progress.
- Free forever — no credit card
- Theory Q&A with detailed answers
- Points, streaks & leaderboards