Search code examples
multithreadingconcurrencyresourcesoperating-systemdeadlock

Non resource deadlock?


I've gotten a question from my professor in operating systems that reads "Explain non resource deadlocks", and I haven't got a clue what I'm supposed to answer!

Doesn't a deadlock require some kind of resource to hog to be considered an actual deadlock?

If any of you have any suggestion to what he might have in mind, please reply.


Solution

  • You can have scenarios where you don't have any resources.

    Say you have two nodes in a network that communicate and have a 3 steps handshake:

    • node1 sends a message to node2 and waits for a response

    • node2 receives the message and sends back the response to node1 and waits

    • but the response is lost on the network due to a temporary disruption

    Both nodes are waiting for each other => deadlock