Deadlock prevention
First Claim
1. A method for preventing deadlocks, comprising:
- locking an inter-device mutex (IDM) for a first client;
sending an error message to a second client in response to a received first lock command from the second client while the IDM is locked for the first client;
granting access to a first number of resources;
associating the first number of resources with the first or second client associated with the locked IDM;
receiving a number of second lock commands from the second client while the IDM is locked for the first client;
double locking the IDM for the first or second client in response to receiving a double lock command from the first or second client, wherein the double lock command includes the same context information associated with the locked IDM, and wherin double-locking the IDM includes;
granting access to a second number of resources; and
associating the second number of resources with the first or second client associated with the double-locked IDM;
unlocking the IDM for the first client in response to an unlock command received from the first client; and
locking the IDM for second client in response to a received third lock command from the second client, wherein the third lock command is received subsequent to the unlocking the IDM for the first client.
4 Assignments
0 Petitions
Accused Products
Abstract
Methods, systems, and computer-readable media with executable instructions stored thereon for preventing deadlocks are provided. An inter-device mutex (IDM) can be locked for a first client. An error message can be sent to a second client in response to a received first lock command from the second client while the IDM is locked for the first client. A number of second lock commands from the second client while the IDM is locked for the first client can be received. The IDM can be unlocked for the first client in response to an unlock command received from the first client. The IDM can be locked for the second client in response to a received third lock command from the second client, wherein the third lock command is received subsequent to unlocking the IDM for the first client.
10 Citations
13 Claims
-
1. A method for preventing deadlocks, comprising:
-
locking an inter-device mutex (IDM) for a first client; sending an error message to a second client in response to a received first lock command from the second client while the IDM is locked for the first client; granting access to a first number of resources; associating the first number of resources with the first or second client associated with the locked IDM; receiving a number of second lock commands from the second client while the IDM is locked for the first client; double locking the IDM for the first or second client in response to receiving a double lock command from the first or second client, wherein the double lock command includes the same context information associated with the locked IDM, and wherin double-locking the IDM includes; granting access to a second number of resources; and associating the second number of resources with the first or second client associated with the double-locked IDM; unlocking the IDM for the first client in response to an unlock command received from the first client; and locking the IDM for second client in response to a received third lock command from the second client, wherein the third lock command is received subsequent to the unlocking the IDM for the first client. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A non-transitory computer-readable medium comprising computer-readable instructions stored thereon that, when executed by one or more processors, cause the one or more processors to:
-
send an error message to a second device in response to a received first lock command having a second device context information from the second device to lock the inter-device mutex (IDM) while the IDM is locked for a first device with a first device context information wherein the locked IDM has are ference count of one; grant access to a first number of resources; associate the first number of resources with the first or second device associated with the locked IDM; receive a number of second lock commands from the second device while the IDM is locked for the first device; receive a double-lock command from the first or second device, wherein the double lock command includes the same context information associated with the locked IDM, and wherein double-locking the IDM includes; granting access to a second number of resources; and associating the second number of resources with the first or second client associated with the double-locked IDM; unlock the IDM for the first device in response to a received unlock command from the first device, the unlock command from the first device including the first device context information; decrease the reference count of the IDM by one in response to unlocking the IDM; and lock the IDM for the second device in response to a received third lock command from the second device subsequent to unlocking the IDM for the first device. - View Dependent Claims (9, 10, 11)
-
-
12. A system for preventing deadlocks during inter-device communication, comprising:
-
a memory operable to store executable instructions; and a processor coupled to the memory, wherein the processor executes the instruction to; lock an inter-device mutex (IDM) for a first device in response to a received lock command including a first device context information, wherein the lock command includes a command to retrieve and associate a first number of resources; grant access to a first number of resources; associate the first number of resources with the first or second device associated with the locked IDM; send a first error message to a second device in response to a received first lock command having a second device context information from the second device to lock the IDM while the IDM is locked for the first device; receive a number of second lock commands from the second device while the IDM is locked for the first device; double-lock the IDM in response to a received double-lock command from the first or second device, wherein in the double lock command includes the same context information associated with the locked IDM, and wherein double-locking the IDM includes; granting access to a second number of resources; and associating the second number of resources with the first or second client associated with the double-locked IDM; unlock the IDM for the first device in response to a received unlock command from the first device, the unlock command from the first device including the first device context information and a command to disassociate the first number of resources; and lock the IDM for the second device in response to a received third lock command from the second device subsequent to unlocking the IDM for the first device. - View Dependent Claims (13)
-
Specification