Multiple granularity locking

Multiple granularity locking

In computer science, multiple granularity locking (MGL), sometimes called the John Rayner locking method, is a locking method used in database management systems (DBMS) and relational databases.

In MGL, locks are set on objects that contain other objects. MGL exploits the hierarchical nature of the contains relationship. For example, a database may have files, which contain pages, which further contain records. This can be thought of as a tree of objects, where each node contains its children. A lock locks a node and its descendants.

Multiple granularity locking is usually used with non-strict two-phase locking to guarantee serializability. MGL uses lock escalation to determine granularity lock on a node and its ancestors.

Lock Modes

In addition to shared (S) locks and exclusive (X) locks from other locking schemes, like strict two-phase locking, MGL also uses intention shared and intention exclusive locks. IS locks conflict with X locks, while IX locks conflict with S and X locks. The null lock (NL) is compatible with everything.

To lock a node in S (or X), MGL has the transaction lock all of its ancestors with IS (or IX), so if a transaction locks a node in S (or X), no other transaction can access its ancestors in X (or S and X).

MGL locking modes are compatible with each other as defined in the following matrix.

Mode NL IS IX S SIX X
NL Yes Yes Yes Yes Yes Yes
IS Yes Yes Yes Yes Yes No
IX Yes Yes Yes No No No
S Yes Yes No Yes No No
SIX Yes Yes No No No No
X Yes No No No No No

Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Granularity — is the extent to which a system is broken down into small parts, either the system itself or its description or observation. It is the extent to which a larger entity is subdivided. For example, a yard broken into inches has finer granularity… …   Wikipedia

  • Two-phase locking — This article is about concurrency control. For commit consensus within a distributed transaction, see Two phase commit protocol. In databases and transaction processing two phase locking, (2PL) is a concurrency control method that guarantees… …   Wikipedia

  • Scheduler (Datenbank) — Ein (Datenbank )Scheduler dient der Verwaltung von Schreib und Lesezugriffen (sog. Operationen) auf Datenbankobjekten. Er sorgt dafür, dass keine Konflikte während der parallelen Ausführung nebenläufiger Transaktionen auftreten. (Transaktionen… …   Deutsch Wikipedia

  • CUBRID — Developer(s) Search Solutions Written in C, C++ Opera …   Wikipedia

  • CUBRID — Тип Реляционная СУБД Разработчик Search Solutions Написана на C, C++ Операционная система Кроссплатформенное программное обеспечение Язык интерфейса Ан …   Википедия

  • Datablitz — Main Memory RDBMS Developer(s) Lucent Technologies Initial release 1997 Stable release 7.1 / 4 Aug 2010 Written in C++, plus Java for the JDBC driver …   Wikipedia

  • Lock (computer science) — In computer science, a lock is a synchronization mechanism for enforcing limits on access to a resource in an environment where there are many threads of execution. Locks are one way of enforcing concurrency control policies. Contents 1 Types 2… …   Wikipedia

  • Microsoft SQL Server — Developer(s) Microsoft Stable release SQL Server 2008 R2 (10.50.2500.0 Service Pack 1) / July 11, 2011; 4 months ago …   Wikipedia

  • Database — A database is an organized collection of data for one or more purposes, usually in digital form. The data are typically organized to model relevant aspects of reality (for example, the availability of rooms in hotels), in a way that supports… …   Wikipedia

  • File system — For library and office filing systems, see Library classification. Further information: Filing cabinet A file system (or filesystem) is a means to organize data expected to be retained after a program terminates by providing procedures to store,… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”