can JVM handle deadlocks in the same way as database transactions? If not, then what is the reason?
throw a brick to attract jade:
the phenomenon of sequential deadlock is described in Java concurrent programming practice, and the philosopher dining problem is mentioned. When a sequential deadlock occurs, a database transaction chooses a victim to release resources and can be reexecuted, and the transaction can be completed normally.
as a result, can JVM find a victim to release resources when a deadlock occurs? Would multithreaded programming be much easier if deadlock avoidance could be accomplished at the JVM level?
again, the question is, can JVM handle deadlocks in the same way as database transactions? If not, then what is the reason?