发明名称 Robust and recoverable interprocess locks
摘要 One embodiment of the present invention provides a system that supports recovery in the event a previous process holding a lock used for mutual exclusion purposes loses ownership of the lock. This loss of ownership may occur due to the previous process dying or the lock becoming unmapped. Under the present invention a process first attempts to acquire the lock. If the attempt to acquire the lock returns with an error indicating that the previous process holding the lock lost ownership of the lock, the process attempts to make program state protected by the lock consistent. If the attempt to make the program state consistent is successful, the system reinitializes and unlocks the lock. Otherwise, the system marks the lock as unrecoverable so that subsequent processes attempting to acquire the lock are notified that the lock is not recoverable. One aspect of the present invention includes receiving a notification in an operating system that a process died, and determining if the process died while holding a lock. If the process died while holding the lock, the system marks the lock to indicate to subsequent acquirers of the lock that a previous holder of the lock died, and unlocks the lock so that other processes may acquire the lock. According to one aspect of the present invention, if the attempt to acquire the lock returns with an error indicating the lock is not recoverable, the process performs operations to work around the program state that is inconsistent, and reinitializes the lock.
申请公布号 US6301676(B1) 申请公布日期 2001.10.09
申请号 US19990235881 申请日期 1999.01.22
申请人 SUN MICROSYSTEMS, INC. 发明人 KUMAR ASWINI S.;STEIN DANIEL A.
分类号 G06F9/46;G06F9/48;G06F9/52;(IPC1-7):G06F9/52;G06F9/54;G06F11/00 主分类号 G06F9/46
代理机构 代理人
主权项
地址