See the section on deadlock handling in the System Interface Guide. See also the section on avoiding deadlock in the Multithreaded Programming Guide.