What is a deadlock in multithreading?
Show answer
Correct answer B
A deadlock occurs when two or more threads wait indefinitely for resources held by each other. None of the threads can procee d, causing the program to freeze. Deadlocks often happen when threads acquire multiple locks in different orders. Proper resource management and lock ordering help prevent deadlocks. Deadlocks are a key concern in multithreading and concurrent programming.