I'd think this is immediately obvious.
One issue is that a thread does not always know what locks it needs
before the fact. And if you hold a lock and want to get another with a
lower key then you have to release the lock you hold then go back and
get them in the right order.
As to references, Wikipedia 'Deadlock' article is a decent starting
point. Many more erudite references are given there.
Post a reply to this message
|