Locking - Basics o f Locking EECS 484 Handout Locking is a...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Basics of Locking EECS 484 Handout Locking is a mechanism commonly used by systems to control access to shared resources by concurrently running users. In the context of a DBMS, these shared resources are data objects, and the users are transactions. Locking is typically implemented using a lock manager, which records which objects are locked, by whom, and in what mode. When a transaction wishes to use a particular object (to read or write), it must request a lock from the lock manager. After it is done with the object, it releases the lock by again notifying the lock manager. In certain cases, the lock manager is not able to immediately grant a lock when it is requested (e.g., if it is held by another transaction). In this case, the lock manager maintains a queue of transactions waiting for the lock. It is important to also recognize that some data items can be shared simultaneously between transactions (e.g., transactions T1 and T2 both want to read object X), but in other cases it is necessary for a transaction to have an exclusive lock (e.g., T1 wants to
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/08/2011 for the course EECS 484 taught by Professor Staff during the Winter '08 term at University of Michigan.

Ask a homework question - tutors are online