What’s the difference between Deadlock and Livelock?

Technology CommunityCategory: ConcurrencyWhat’s the difference between Deadlock and Livelock?
VietMX Staff asked 3 years ago
  • In concurrent computing, a deadlock is a state in which each member of a group of actions, is waiting for some other member to release a lock
  • livelock is similar to a deadlock, except that the states of the processes involved in the livelock constantly change with regard to one another, none progressing. Livelock is a special case of resource starvation; the general definition only states that a specific process is not progressing.

Livelock is a risk with some algorithms that detect and recover from deadlock. If more than one process takes action, the deadlock detection algorithm can be repeatedly triggered. This can be avoided by ensuring that only one process (chosen randomly or by priority) takes action.