This can be important if you need to obtain locks on a number of resources before proceeding, but wish to avoid deadlock - a situation in which two processes are each waiting for a resource which the other process has already locked.