Search code examples
deadlock

Is solution without starvation also solution without deadlocks? And vice versa?


I was just wondering...

Is solution without starvation also solution without deadlocks? And vice versa, is solution without deadlocks also solution without starvation?


Solution

  • A solution without starvation would mean the system is "fair"; each thread has just enough access to a shared, limited resources to make progress. In this case I would assume there are no deadlocks. Deadlock is the end of the road for starving threads... they all starve and no one makes progress.

    A solution with no deadlocks could still have cases where only a subset of the threads have "fair" access to a shared, limited resource. The remainder of threads would starve.