Method and apparatus for resource access synchronization
First Claim
1. A resource access control mechanism for a multi-thread computing environment, the mechanism being operable:
- to manage a sequence of one or more mutexes, wherein the sequence of mutexes is associated with a resource and each mutex may be allocated to one thread; and
when a requesting thread attempts an access to the resource, to lock a mutex, wherein the locked mutex is allocated to the requesting thread, and to attempt to lock a previous mutex in the sequence if present, whereby the requesting thread is suspended if the previous mutex is already locked until the previous mutex is unlocked in response to a previous thread finishing access to the resource.
2 Assignments
0 Petitions
Accused Products
Abstract
Apparatus and methods of synchronizing resource access for a multi-threaded computing environment are disclosed. The mechanism is operable to manage a sequence of one or more mutexes, wherein the sequence of mutexes is associated with a resource and each mutex may be allocated to one thread. The mechanism is operable, when a requesting thread attempts an access to the resource, to lock a mutex, wherein the locked mutex is allocated to the requesting thread and to attempt to lock a previous mutex in the sequence if present. The requesting thread is suspended if the previous mutex is already locked until the previous mutex is unlocked in response to a previous thread finishing access to the resource. When attempting to lock a previous mutex in the sequence where the previous mutex is unlocked, the mechanism is operable to lock the previous mutex on behalf of the requesting thread and then to unlock the previous mutex on behalf of the requesting thread. The resource access control mechanism unlocks the mutex allocated to the requesting thread in response to the requesting thread completing access to the resource. By ensuring that only one thread is waiting on the release of any one mutex, problems with ordering of the resource access is avoided.
-
Citations
40 Claims
-
1. A resource access control mechanism for a multi-thread computing environment, the mechanism being operable:
-
to manage a sequence of one or more mutexes, wherein the sequence of mutexes is associated with a resource and each mutex may be allocated to one thread; and
when a requesting thread attempts an access to the resource, to lock a mutex, wherein the locked mutex is allocated to the requesting thread, and to attempt to lock a previous mutex in the sequence if present, whereby the requesting thread is suspended if the previous mutex is already locked until the previous mutex is unlocked in response to a previous thread finishing access to the resource. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A resource access control program for a multi-thread computing environment, the program comprising program code on a carrier medium, which program code is operable to manage a sequence of mutexes, wherein the sequence of mutexes is associated with the resource and each mutex may be allocated to one thread and is operable to respond to a call from a thread requesting access to a resource by:
-
locking a mutex for the requesting thread, wherein the mutex is allocated to the requesting thread; and
attempting to lock a previous mutex in the sequence if present, whereby the requesting thread is suspended if the previous mutex is already locked, until the previous mutex is unlocked in response to a previous thread finishing access to the resource. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17, 18, 20, 21)
-
-
19. A computer program product comprising program code on a carrier medium, which program code is operable to manage a sequence of one or more mutexes, wherein the sequence of mutexes is associated with a resource and each mutex may be allocated to one thread, and the program code is further operable to respond to a call from a thread requesting access to the resource by:
-
locking a mutex for the requesting thread, wherein the mutex is allocated to the requesting thread; and
attempting to lock a previous mutex in the sequence if present, whereby if the previous mutex is already locked, the requesting thread is suspended until the previous mutex is unlocked in response to a previous thread finishing access to the resource.
-
-
22. A computer system comprising:
-
a processor;
a memory storing a method for controlling access to a resource for a multi-thread computing environment, wherein upon execution of said method on said processor said method comprises;
managing a sequence of one or more mutexes, wherein the sequence of mutexes is associated with the resource and each mutex may be allocated to one thread;
receiving a request from a thread to access the resource;
locking a mutex in the sequence for the requesting thread, wherein the mutex is allocated to the requesting thread; and
attempting to lock a previous mutex in the sequence if present, whereby the requesting thread is suspended if the previous mutex is already locked until the previous mutex is unlocked in response to a previous thread finishing access to the resource. - View Dependent Claims (23, 24, 25, 26, 27, 28, 29, 30, 31)
-
-
32. A method of resource access control for a multi-thread computing environment, the method comprising:
-
managing a sequence of one or more mutexes, wherein the sequence of mutexes is associated with a resource, and each mutex may be allocated to one thread;
receiving a request from a thread to access the resource;
locking a mutex in the sequence for the requesting thread, and attempting to lock a previous mutex in the sequence if present, whereby the requesting thread is suspended if the previous mutex is already locked until the previous mutex is unlocked in response to a previous thread finishing access to the resource. - View Dependent Claims (33, 34, 35, 36, 37, 38, 39, 40)
-
Specification