Monday, November 12, 2007

Granularity of Locks


Hierarchical lockable units:

assume set of resources to be locked is organized in a hierarchy, e.g. (database, areas, files, records) as a simple hierarchy. Each node of hierarchy can be locked, and in doing so, one implicity locks all of that node's descendants. There is shared access (S, shared-read access) and exclusive access (X, exclusive read/write access).
In order to lock a subtree rooted at node R in S or X, one must prevent others from obtaining incompatible locks on any ancestor of R. A new mode, "intention mode" is introduced to do this - all ancestors of a node are tagged with intention mode before the node itself is locked. Summary of modes:
null (NL): no access
intention-share (IS): allows requestor to lock descendant nodes in S or IS mode. (does no implicit locking)
intention-exclusive (IX): allows requestor to explicitly lock descendants in X, S, SIX, IX, or IS mode. (does no implicit locking)
share (S): access to node and all descendants without setting further locks. (implicitly sets S locks on all descendants)
share and intention exclusive (SIX): implicitly locks all descendants of node in share mode and allows requestor to explicitly lock descendant nodes in X, SIX, or IX mode. (for finer grained locking)
exclusive (X): exclusive access to node and all descendants. (implicitly sets X locks on all descendants)

To request a node,
before requesting S or IS on node, all ancestor nodes must be held in IX or IS mode.
before requesting X, SIX, or IX on node, all ancestors must be held in SIX or IX mode.
locks should be released either at end of transaction (in any order), or in leaf to root order in the middle of a transaction.

Source from: http://swig.stanford.edu/pub/summaries/database/locks.html

21 comments:

Anonymous said...

order alprazolam no prescription where can you buy gador xanax - xanax side effects headache

Anonymous said...

buy tramadol online tramadol withdrawal symptoms how long - tramadol joint pain

Anonymous said...

buy tramadol online tramadol 50mg vs vicodin - tramadol hcl 50 mg images

Anonymous said...

online xanax no prescription xanax vs xanax bars - xanax 11

Anonymous said...

buy tramadol online tramadol 50 mg like vicodin - tramadol hexal 100 mg

Anonymous said...

buy tramadol cod overnight tramadol for dogs no prescription - tramadol withdrawal time frame

Anonymous said...

buy tramadol cheap no prescription tramadol no prescription cheap - buy tramadol online in florida

Anonymous said...

buy tramadol online tramadol blood pressure - buy tramadol online no prescription usa

Anonymous said...

buy carisoprodol online without prescription carisoprodol safe dosage - carisoprodol generic name

Anonymous said...

buy carisoprodol cod soma carisoprodol classification - buy carisoprodol online no prescription

Anonymous said...

buy tramadol online overdose amount for tramadol - tramadol withdrawal breathing

Anonymous said...

buy cheap cialis online no prescription where can i buy cialis cheap - duane reade cialis price

Anonymous said...

buy tramadol online buy 180 tramadol online - tramadol online free shipping

Anonymous said...

cialis no prescription lowest price cialis 20mg - cialis price usa

Anonymous said...

buy tramadol online buy tramadol hydrochloride - klonopin and tramadol high

Anonymous said...

http://blog.dawn.com/dblog/buy/#blog buy tramadol online nz - tramadol 50mg vs tylenol 3

Anonymous said...

http://buytramadolonlinecool.com/#51726 can you order tramadol online legally - tramadol 100 mg iv

Anonymous said...

buy tramadol online with mastercard kicking tramadol addiction - order tramadol online us pharmacy

Anonymous said...

tramadol 50 mg tramadol 50 mg with food - buy tramadol online no prescription cheap

Anonymous said...

http://ranchodelastortugas.com/#37284 order brand name xanax online - xanax drug forms

Anonymous said...

online xanax xanax side effects user reviews - xanax xr dosage anxiety