Specifications
Sun Services
Java™ Programming Language
Module 13, slide 24 of 37
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision F
Deadlock
A deadlock has the following characteristics:
• It is two threads, each waiting for a lock from the other.
• It is not detected or avoided.
• Deadlock can be avoided by:
• Deciding on the order to obtain locks
• Adhering to this order throughout
• Releasing locks in reverse order










