Ecolearn Hub
Ecolearn Hub
May 24, 2025 at 07:53 AM
*What is a Deadlock?* *Example: Two People with One Pen and One Notebook* *Scenario* : • Two people: Alice and Bob • They both need one pen and one notebook to write. • Only 1 pen and 1 notebook are available. *What Happens:* Alice picks up the pen. Bob picks up the notebook. *Now:* •Alice is waiting for the notebook (held by Bob). •Bob is waiting for the pen (held by Alice). •Neither can write, because both are holding one item and waiting for the other. *Result* : Both people are stuck. This is a deadlock — neither can proceed unless one voluntarily gives up what they are holding. *Deadlock is a condition where a set of processes are blocked because each process is holding at least one resource and waiting for another resource that is held by another process in the same set.*
👍 ❤️ 5

Comments