Lock mechanism

Electrical computers and digital data processing systems: input/ – Access locking

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C710S036000, C710S056000, C710S057000, C710S108000, C710S109000, C710S119000, C710S220000, C711S147000, C711S148000, C711S149000, C711S150000, C711S151000, C711S152000, C711S153000, C711S114000, C711S164000, C709S241000, C709S226000

Reexamination Certificate

active

06253273

ABSTRACT:

BACKGROUND OF THE INVENTION
The invention relates generally to global locking mechanisms for controlling computer access to shared resources and more particularly to a locking mechanism that is implemented within a data storage system.
Often, when resources are shared by multiple users, e.g multiple applications running on a single host processor or multiple host processors, there must be some way of preventing more than one such user to access that resource at any one time. The shared resources can be almost any resource that might be needed by multiple users including, for example, memory, a data structure within memory, printers, communication devices, etc. Typically, access control for such a shared resource is accomplished through a locking mechanism, which may be very simple, as in the case of semaphore locks, or it may be very complex as in the case of systems which also provide deadlock detection, automatic release, and other features. The semaphore lock can be implemented by a flag stored in a predetermined storage location. If the flag is set, that means one of the users has acquired the semaphore and the relevant shared resource is not available. If the flag is cleared, that means no other user has acquired the semaphore and the requester can acquire the semaphore and access the shared resource.
Generally, such a locking mechanism must be implemented on a device that is also shared, or at least accessible, by all of the users that might need access to the shared resource to which access is being controlled. For example, in the case of multiple host computers connected to an intelligent data storage system, such as an integrated cache disk array system, the locking mechanism resides in shared memory within the data storage system. To obtain the semaphore for a resource, the requester (e.g. one of the host computers) must send an appropriate command to the data storage system over the communication channel linking the two together. Since the resource may not be available when requested, the user must wait a preselected period of time and try again, repeating this process (i.e., polling) until a lock is obtained. To reduce latency, i.e., time between when a lock is freed up and when another user gets the lock, the polling must be at a relatively high frequency e.g. 100 per second. During periods of high activity, such high polling rates can saturate the channel thereby seriously degrading the performance of the overall system. Furthermore, the high polling rate may build up the queue of I/O requests on the host computer side of the channel. Even though a resource might have become free and acquired early on, all of the remaining queued requests still must be serviced and answered.
One approach to addressing this problem has been to dedicate a separate channel for the lock requests. Thus, saturating that channel does not cut into the resources available for exchanging data between the host computer and the data storage system. But, of course, that approach has the disadvantage of eliminating that dedicated channel as a resource for exchanging data with the data storage system.
SUMMARY OF THE INVENTION
In general, in one aspect, the invention is a method of providing a lock to a requester. The method includes the steps of storing a lock indicator at a storage location on a storage medium; receiving a lock command from a requester on a host computer, wherein the lock command identifies the storage location on the storage medium and represents a lock request; in response to receiving the lock command, retrieving the lock indicator from the storage medium; performing an exclusive OR operation on the lock request and the retrieved lock indicator to produce a lock request result; and sending an indication back to the host computer indicating whether the lock request was granted.
In preferred embodiments, the method further includes the step of writing the lock request result to the storage location in the storage medium. Also, the method includes the steps of, in response to receiving the lock command, repeatedly polling the storage location on the storage medium for the indication that the lock request was granted.
In general, in another aspect, the invention is a data storage device configured to provide to an application that is running on a host computer connected to the data storage device a global locking mechanism for a resource. The device includes a data storage medium which during use stores a lock indicator for said resource; means for receiving a lock command from the host computer, the lock command representing a lock request; means for generating a lock request result in response to the lock command, the generating means including means for performing an exclusive OR operation on the lock request and the lock indicator to produce the lock request result; and means for sending the lock request result back to the host computer.
Preferred embodiments include the following features. The generating means further includes means for retrieving the lock indicator from the data storage medium; and means for repeatedly performing a polling cycle during which generation means first retrieves the lock indicator and then performs the exclusive OR operation. Also, the lock command includes an address of a storage location and wherein the generating means further includes a means for retrieving the lock indicator from the storage location. The lock command also includes a count parameter and the polling means repeatedly performs the polling cycle until either the lock request result indicates that the lock has been granted or until the number of cycles equals the count parameter at which time the sending means is caused to send the lock request result to the host computer.
One advantage of the invention is that it eliminates the large volume of I/O that is required to implement global locks on some of today's data storage systems. Also, with the invention, the polling function is moved down to the data storage system and thus it avoids saturating the channel.
The invention also opens up application level locking, as opposed to the computer level locking which is currently available.
Other advantages and features will become apparent from the following description of the preferred embodiment and from the claims.


REFERENCES:
patent: 5140685 (1992-08-01), Sipple et al.
patent: 5146564 (1992-09-01), Evans et al.
patent: 5269009 (1993-12-01), Herzl et al.
patent: 5276847 (1994-01-01), Kohn
patent: 5375217 (1994-12-01), Jibbe et al.
patent: 5418962 (1995-05-01), Bodin et al.
patent: 5586331 (1996-12-01), Levenstein
patent: 5675284 (1997-10-01), Sgrignoli
patent: 5689678 (1997-11-01), Stallmo et al.
patent: 5721943 (1998-02-01), Johnson
patent: 5742830 (1998-04-01), Elko et al.
patent: 5809539 (1998-09-01), Sakakibara et al.
patent: 5832297 (1998-11-01), Ramagopal et al.
patent: 5845147 (1998-12-01), Vishlitzky et al.
patent: 5931919 (1999-08-01), Thomas et al.
patent: 5933825 (1999-08-01), McClaughry et al.
patent: 5940826 (1999-08-01), Heideman et al.
patent: 5987550 (1999-11-01), Shagam

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

Lock mechanism does not yet have a rating. At this time, there are no reviews or comments for this patent.

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

Rate now

     

Profile ID: LFUS-PAI-O-2537102

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