主权项 |
1. A method, operable on a computerized system having multiple CPU cores, for managing access to resources of a storage array, comprising:
creating an instance of a mutex object that includes a mutex sub-object for each of the CPU cores, each mutex sub-object having a share lock counter; receiving a request to obtain non-exclusive access to a resource of the storage array; executing a first set of instructions on a first CPU core of the computerized system, the first CPU core having its own cache, to acquire a share lock on the resource, including incrementing the share lock counter of the mutex sub-object for the first CPU core in the cache of the first CPU core; and executing a second set of instructions on a second CPU core of the computerized system, the second CPU core having its own cache, to release the share lock on the resource acquired by the first set of instructions executing on the first CPU core, including decrementing the share lock counter of the mutex sub-object for the second CPU core in the cache of the second CPU core, wherein instantiating the mutex object includes instantiating the mutex object within a memory shared among the multiple CPU cores. |