Robust and recoverable interprocess locks

Error detection/correction and fault detection/recovery – Data processing system error or fault handling – Reliability and availability

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C714S015000, C710S200000, C711S164000

Reexamination Certificate

active

06301676

ABSTRACT:

COPYRIGHT NOTICE PURSUANT TO 37 C.F.R. §1.71(E)
A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure, as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever.
BACKGROUND
1. Field of the Invention
The present invention relates to inter-process synchronization mechanisms in computer systems. More specifically, the present invention relates to a method and apparatus for implementing inter-process locks that provides for robust recovery in the event a process fails while holding a lock.
2. Related Art
Computer systems often support multiple processes that can work together on a single computational task. One of the challenges in using multiple processes is to synchronize the processes so that they do not interfere with each other. This is typically accomplished through mutual exclusion locks (mutex locks), which are used to ensure that only one process at a time performs a particular task or has access to specific items of shared data.
A process typically attempts to “acquire” a lock before executing a critical section of code or accessing specific items of shared data. If no other process presently holds the lock, the process acquires the lock by setting the lock to a locked state. After acquiring the lock, the process is free to execute the critical section of code or manipulate the items of shared data without interference from other processes. While the process holds the lock, other processes attempting to acquire the lock will “block” waiting for the lock, and will not be able to proceed until the lock is released. After the process completes the task, it releases the lock, thereby allowing other processes to acquire the lock.
Mutual exclusion locks create complications for computer systems that operate robustly. Such “robust” computer systems are designed to continue processing even if some of the processes or processors involved in a computational task fail during program execution. If a process fails while holding a mutual exclusion lock, other processes attempting to acquire the lock will “hang,” waiting for the failed process to release the lock. The computational task will consequently come to a halt.
To remedy this problem, some computer systems simply release a lock if a process holding the lock fails. This allows other processes that are blocked on the lock to continue processing. However, the process that failed may have left the data protected by the lock in an inconsistent state. This may cause the remaining processes to produce an incorrect result or to fail at some time in the future.
Other systems notify the remaining processes that the state protected by the lock was left in an inconsistent state when the process died. This allows the remaining processes to take action to make the state consistent again. However, the remaining processes may not be successful in making the state consistent again. In this case, the remaining processes will ultimately produce an incorrect result or will fail at some time in the future.
What is needed is a method or an apparatus that provides robust recoverable locks that do not let other processes hang if a process holding a lock fails, and which allows the other processes to restore the state protected by the lock to a consistent state.
SUMMARY
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.


REFERENCES:
patent: 5136704 (1992-08-01), Danielsen et al.
patent: 5305448 (1994-04-01), Insalaco et al.
patent: 5734817 (1998-03-01), Roffe et al.

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Robust and recoverable interprocess locks does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Robust and recoverable interprocess locks, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Robust and recoverable interprocess locks will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2567065

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.