"Are there any" best practices "to reduce the likelihood of a dead end?"
Deadlock means 2 (or more) processes, 2 (or more) resources and two different access orders.
Process 1 should get A and B.
Process 2 should get B and wait for A.
If each process first gets A, the deadlock frequency decreases.
Since you are at a dead end on the whole page, it’s hard to make sure everyone gets the same page to start their transaction.
You can try to reduce conflicts by making sure that the lines are widely scrambled between pages.
You can try to reduce conflicts by entering the line "You must get this first", which will be effectively single-threaded applications.
source share