Patent ID: 6983461

Claim:
A computer implemented method in a virtual machine layer of a computer system supporting multiple processes, said method including the steps of: utilizing a set of monitors for controlling access to resources of the computer system, whereby a given process has to enter a given monitor in order to access a corresponding given resource, and has to join an entry queue for the given monitor if the given resource is currently owned by another process for which the given process has entered; responsive to a predetermined condition of a requesting process requesting to enter a requested monitor, from the set of monitors, currently owned by a different process, examining queued processes queued on at least one of the set of monitors to determine whether there is a deadlock situation by detecting a cyclic dependency at a time a given dependency is created, wherein the examination of queued processes queued on the at least one of the set of monitors to determine whether there is the deadlock situation includes those processes having a conditional wait on at least one of the set of monitors; and if the deadlock situation is found, returning information about an identity of i) identified processes from the examined queued processes, and ii) identified monitors from the set of monitors, involved in the deadlock situation with an exception returned to an application while the application is running on the virtual machine layer of the computer system thereby enabling the application to resolve the deadlock situation by having at least one of the identified processes release at least one of the identified monitors that the at least one identified process owns but is not currently using for continued processing by the application without the deadlock situation.