MOSS Concurrency Control Protocol (Distributed Locking in Database)
Last Updated :
02 Nov, 2023
This is a protocol which is used to control the concurrency in the Distributed database environment, Here we'll read about the rules and regulations that are required to keep in mind while applying MOSS Concurrency Control Protocol.
MOSS Concurrency Control Protocol:-
a) It is mainly used for handling the nested(hierarchical) transactions which are based on inheritance.
b) Consider a Transaction(T) acquire a lock on a data-item(X) in some mode(M).
c) The Transaction(T) holds the lock in mode(M) until it terminates.
d) When anyone subtransaction(T1) of T commits, then its parent Transaction occupies or inherits that lock and retains until all subtransaction can't finish.
e) If a transaction holds a lock on a data-item(X) so, It has the right to access the locked data-item(X) in the corresponding mode. However, it is not valid in case if a transaction retained a lock from any other some subtransaction(descendant).
f) A retained lock is only a just a kind of placeholder and indicates that the subtransactions that are out of corresponding hierarchy can't acquire the lock, but descendant can acquire the lock.
g) As soon as a transaction becomes a retainer of the descendant subtransaction S's lock, it remains a retainer until the transaction finishes.
General Locking rules regarding this Protocol:-
a) Subtransaction(T1) may acquire a read lock over a data-item(X) if:
a.1) no other subtransaction(descendant) holds the write lock on X, and
a.2) All the subtransactions that have retained a write lock on X are ancestors of subtransaction(S).
b) Subtransaction(T1) may acquire a write-lock on a data-item(X) if:
b.1) no other subtransaction holds a read/write lock on X, and
b.2) all subtransactions that have retained a read/write lock on X are ancestors of T1.
c) When a subtransaction(T1) completes its execution, the parent of T1 inherits(retains) the lock held by T1 in the same mode as was held by T1.
Fig.cd) When a top-level of subtransactions(T3) commits all of its descendant's release the held locks along with retained locks.
Fig.de) When a subtransaction(T3) aborts, it releases all of its held locks along with retained locks. All subtransactions originated from an aborting transaction are also aborted and must start from the very beginning if they have started their execution.
Fig.e
Similar Reads
Lock Based Concurrency Control Protocol in DBMS In a DBMS, lock-based concurrency control is a method used to manage how multiple transactions access the same data. This protocol ensures data consistency and integrity when multiple users interact with the database simultaneously.This method uses locks to manage access to data, ensuring transactio
7 min read
Graph Based Concurrency Control Protocol in DBMS In a Database Management System (DBMS), multiple transactions often run at the same time, which can lead to conflicts when they access the same data. Graph-Based Concurrency Control Protocol helps manage these conflicts and ensures that the database remains consistent.In this protocol, transactions
4 min read
Two Phase Locking (2-PL) Concurrency Control Protocol | Set 3 In database systems, managing concurrent transactions is essential to maintain data consistency and ensure smooth operation. Two-Phase Locking (2PL) is a widely used concurrency control protocol that enforces serializability ensuring transactions are executed in a conflict-free manner. By dividing a
4 min read
Types of Locks in Concurrency Control Commercial demands for ensuring smooth functionality and highly efficient run-time servers, make it highly prime for Database Designers to work out systems and code which cleverly avoid any kinds of inconsistencies in multi-user transactions, if not doubt the standard of memory management in read-he
11 min read
What is Multi-Version Concurrency Control (MVCC) in DBMS? Multi-Version Concurrency Control (MVCC) is a database optimization method, that makes redundant copies of records to allow for safe concurrent reading and updating of data. DBMS reads and writes are not blocked by one another while using MVCC. A technique called concurrency control keeps concurrent
5 min read
Concepts of Distributed databases A Distributed database is defined as a logically related collection of data that is shared which is physically distributed over a computer network on different sites. Distributed DBMS : The Distributed DBMS is defined as, the software that allows for the management of the distributed database and ma
3 min read
Concurrency Control in DBMS In a database management system (DBMS), allowing transactions to run concurrently has significant advantages, such as better system resource utilization and higher throughput. However, it is crucial that these transactions do not conflict with each other. The ultimate goal is to ensure that the data
7 min read
Functions of Distributed Database System Distributed database systems play an important role in modern data management by distributing data across multiple nodes. This article explores their functions, including data distribution, replication, query processing, and security, highlighting how these systems optimize performance, ensure avail
10 min read
Concurrency Control Techniques Concurrency control is provided in a database to:(i) enforce isolation among transactions.(ii) preserve database consistency through consistency preserving execution of transactions.(iii) resolve read-write and write-read conflicts.Various concurrency control techniques are:1. Two-phase locking Prot
4 min read
Timestamp based Concurrency Control Timestamp-based concurrency control is a method used in database systems to ensure that transactions are executed safely and consistently without conflicts, even when multiple transactions are being processed simultaneously. This approach relies on timestamps to manage and coordinate the execution o
5 min read