ஒரு deadlock என்பது இரண்டு அல்லது அதற்கு மேற்பட்ட threads ஒவ்வொன்றும் நிரந்தரமாக block ஆகி, ஒவ்வொன்றும் மற்றொன்று வைத்திருக்கும் ஒரு resource-க்காகக் காத்திருக்கும் நிலை. எதுவும் முன்னேறாது.
நான்கு அவசியமான (Coffman) நிபந்தனைகள்
நான்கும் ஒரே நேரத்தில் நிலவ வேண்டும் — ஏதேனும் ஒன்றை நீக்கினால் deadlock சாத்தியமற்றது:
1. Mutual exclusion → a resource is held exclusively (only one holder at a time)
2. Hold and wait → a thread holds one resource while waiting to acquire another
3. No preemption → resources can't be forcibly taken; only released voluntarily
4. Circular wait → a cycle: T1 waits for R2 (held by T2), T2 waits for R1 (held by T1)
