You are on page 1of 4

Recoverable process :

10 of their action and their fore can restore earlier states if a failure
access .
A commit protocol :
It Allows multiple processes to coordinate the committing or aborting
of a transaction. The most common commite protocol is the two
phase commit protocol.
2 Distributed Two phase Locking (2pL)
In order to insure serializability of parallel executed transections
elaborated different methods of concurrent control. One of these
method is locking method. There are different form of locking methods.
Two phase locking protocol is one of the basic concurrency control
protocol in distributed data base system .The main approach of these
protocol is read any ,write all.
Transactions set read locks on items that they read and they concern
their read locks to write locks on items that need to be updated .To
read on items it suffices to set a read lock on any coppy of the items ,so
the locks coppy is locked to update an item ,write lockes are required
on all copies.
Write locks are obtained as the transection executes ,with the
transection blocking on a write request until all of the copies of the
item to be updated have been successfully locked .All locks are held
until the transection has successfully committed or observed [2].
The 2pl protocol oversees locks by determining when transection can
acquire and release locks. The 2pl protocol forces each transection to
make a lock or unlock request in to two steps.

1
Growing phase :
-transection may obtain lock but may not release any locks.
Shrinking phase:
-A transection may release locks but not obtain any new lock.
A transection first enters into the Growing phase, makes request for
required locks ,then gets into the shrinking phase where it release all
locks and cannot make any more request .
Transection in 2PL protocols should get all needed locks before getting
into the unlock phase.
While the 2PL protocol guerentees serielizabbility ,it does not ensure
that dead lock do not happen. So dead lock is a possibility in this
algorithm local dead lock are checked for any time a transection blocks
and are resolved when necessary by restarting the transection with the
most recent initial startup time among those involved in the dead lock
cycle.
3 Time Stamp Ordering :
- based on algorithm do not maintain serializabbility but mutual
exclusion ,but select (prior) serialization order and execute transection
accordingly .
Transaction Ti is Assigned a globally unique timestamp ts(Ti).
Conflicting operations Ois and ok1 are resolved by time stamp
order that is Ois is executed before Ok1 if and only if ts(Ti )<ts(tk).
To allow for the scheduler to check whether operations arrive in
correct order ,each data item is assigned a write item stamp
(wts)and read time stamp (rts).
rts(x):largest time stamp of any read on x.

2
wts(x):largest time stamp of any written x. Then the sckeduler has
to perform the following checks read opperationRi(x).
If ts (Ti)<Wts (x):Ti attemptes read over written data,abort Ti.
If ts(Ti)>=wts (x): the operation is allowed and rts (is)updated

Concurrency Control:-
In distributed database system, database is typically used by many
users.
These systems usually allow multiple transaction to run concurrently
i.e. at the same time.
Concurrency control is the activity of coordinating concurrency access
to a database in a multi user database management system (DBMS).
Concurrency control permits users to access a database in a multi-
programed fashion while preserving the illusion that each user is
executing alone one dedicated system.
The main technical difficulty in attaining this goal is to prevent database
update performed by one user from interfering with database retrievals
and updates performed by other.
When the transactions are updating concurrently, it may lead to several
problems with consistency of the data.
Distributed Concurrency Control Algorithm
Before discussing the algorithm, we need to get an idea about the
distributed transaction
Distributed Transaction: -

3
It is a transaction that runs in multiple process, usually on several
machines. Each process work for transaction.
Distributed transaction processing systems are designed to facilitate
transaction that span heterogeneous, transaction-aware resource
managers in a distributed environment.

A distributed transaction processing system maintains the ACID


properties. However, maintenance of those properties in distributed
transaction by using two features. These are:-

You might also like