Altruistic Locking: A Strategy for Coping with Long Lived Transactions

Report ID: TR-087-87
Author: Alonso, Rafael / Garcia-Molina, Hector / Salem, Kenneth
Date: 1987-04-00
Pages: 25
Download Formats: |PDF|
Abstract:

Long lived transactions (LLTs) hold on to database resources for relatively long periods of time, significantly delaying the completion of shorter and more common transactions. To alleviate these problems we propose an extension to two-phase locking, called altruistic locking, whereby LLTs can release their locks early. Transactions that access this released but uncommitted data run in the wake of the LLT and must follow special locking and commit rules. Additional performance improvements can be obtained if the LLT predeclares its access set (this is only an option). Altruistic locking guarantees serializability and allows transactions to access the database in any order. In addition to presenting the protocol, we discuss how LLTs can be automatically analyzed in order to extract the access pattern information used by altruistic locking.