Browse Prior Art Database

Conditional Locking of Nonroot Index Pages

IP.com Disclosure Number: IPCOM000035897D
Original Publication Date: 1989-Aug-01
Included in the Prior Art Database: 2005-Jan-28
Document File: 2 page(s) / 51K

Publishing Venue

IBM

Related People

Crus, RA: AUTHOR [+4]

Abstract

A method is disclosed for locking pages of hierarchical data structures, such as relational data base indexes. The method maximizes concurrent access to the data while preventing conflicting data changes and minimizing deadlocks.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 53% of the total text.

Page 1 of 2

Conditional Locking of Nonroot Index Pages

A method is disclosed for locking pages of hierarchical data structures, such as relational data base indexes. The method maximizes concurrent access to the data while preventing conflicting data changes and minimizing deadlocks.

In this method, the hierarchical structure is first accessed by obtaining a lock (shared or loose) on its root page. Nonroot pages are accessed by first requesting conditional locks on them. If the conditional lock is granted for a nonroot page, the lock on the root page is released and no further lock processing need be done. If the nonroot lock is unavailable, this method still releases the lock on the root page, and immediately unconditionally requests a lock on the nonroot page. Releasing the root page lock minimizes the possibility of deadlocks with other transactions. The unconditional request of the nonroot lock causes the transaction to wait until the requested page becomes free, and then allows access to that page.

Relational data base indexes stored as hierarchical tree structures can benefit greatly from this method. To access an index according to this method, the first step 10 is to request a 'shared' or 'exclusive' lock on the root page of the index. Next, the needed page is determined 12. Then a lock is requested 14 for the nonroot page to be accessed (typically a leaf page). If the lock is available 16, it will have been already granted 12, and after freeing the root page 30 the lo...