Patent ID: 8938738
Filing Date: 2015-01-20
Classification: G06F

Abstract:
1. A computer-readable storage medium comprising one of an optical disk, a magnetic storage device, or a solid state storage device having computer-readable instructions stored thereon for a shared lock for implementation across multiple processes, the shared lock adapted to be executed entirely in a user mode of an operating system capable of executing in the user mode and in a kernel mode, and the shared lock for controlling synchronized access to a shared resource, the computer-readable instructions, when executed by a computer, cause the computer to implement: an allocation index identifying the shared lock; a first counter indicating a number of capable of using the shared lock to access the shared resource; a process identifier uniquely identifying a first process that has currently acquired the shared lock; a second counter indicating a number of outstanding processes waiting for the shared lock, the second counter being incremented by a second process when attempting to acquire the shared lock that is currently acquired by the first process, the second counter being decremented as outstanding processes acquire the shared lock or by timing out; a third counter to indicate whether a shared lock is available by indicating the number of times that a process has acquired the lock, decremented by the number of times that the process has released the lock; and the second process to release the shared lock on behalf of the first process if the first process has terminated execution without releasing the shared lock.