0% found this document useful (0 votes)
37 views48 pages

Distributed Transaction Processing Overview

unit 4

Uploaded by

VIKAS PANWAR
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as KEY, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views48 pages

Distributed Transaction Processing Overview

unit 4

Uploaded by

VIKAS PANWAR
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as KEY, PDF, TXT or read online on Scribd

UNIT-3Distributed

Transaction Processing
Dr. S. K. Verma
Transaction
Defines a sequence of server operation that is
guaranteed by the server to be atomic in
presence of multiple client and server crashes.
Recoverable objects can be recovered after their
server crashes
Object stored in volatile memory
Transaction is set of operation
Contd.
Atomic operations are free from
interference from concurrent operation
being performed in other threads.
Separate requests to the server to be
atomic in the sense that:
Free from interference
All operation must be completed or must have no
effect in crashes moment
Contd.
Transaction originate from DBMS
Can be a part of middleware
Transaction must be atomic
Failure atomicity
Durability
Isolation
ACID property
Atomicity
Consistency
Isolation
Durability
Contd.
Concurrency control
The lost update problem
Inconsistent retrievals
Serial equivalence
Conflicting operations
Recoverability from aborts
Dirty reads
Recoverability of transaction
Cascading abort
Premature writes
Strict executions of transactions
Tentative versions
Nested transactions
Contd.
Advantage
Subtransactions at one level may run concurrently
with other subtransactions at same level of hierarchy.
Subtransaction may commit or abort independently
Rules for commitment
Transaction may commit or abort only after its child
transaction have complete.
When subtransactions completes, it can make
independent decision to commit or abort
When parent aborts, all of its subtransactions aborts.
When subtransactions aborts, parents can decide to
abort or not
If the top level transaction is commits, all
subtransactions can commit too.
Locks
Used for serializing mechanism of
transactions.
Contd.
Strict two phase locking
Server contains many objects out of which few
are used concurrently, in this case locks applied
to all. Clerk is able to do transaction
Portion of object should to serialized and as small
as possible (Read/Write). Many reader single
writer scheme( Used shared locks for read lock)
Contd.
Contd.
The aim of locking scheme for nested
transaction to serialize access to objects so
that
Optimistic concurrency
control
Drawback of locking scheme
Lock maintenance is an overhead
Lock may results a deadlock
To avoid cascading aborts, locks cannot be
released until the end of the transaction, this
reduce concurrency
Accessing same object by two clients
rare(optimistic approach)
Each transaction has following phase
Working phase
Validation phase
Update phase
Contd.
Validation of transaction
Use read write conflicts
Each transaction is assigned a transaction
number.
If transaction is validate and completes
successfully, number retains
If fails number released for reassign.
Transaction always finishes its working phase
after all lower no. transaction.
Contd.
Backward validation
Contd.
Forward Validation
write set of the transaction is compared with the
read set of all overlapping active transaction
Validation is delayed until a the conflicting
transactions are finished.
Abort all the conflicting transactions and commit
the transaction being validated
Abort the Transaction being validated.
Time stamp ordering
Each transaction is assigned a unique
timestamp value when it start.
Time stamp defines position in the time
sequence of transaction
Contd.
Contd.
Flat and Nested Distribute
Transaction
Contd.
Contd.
Coordinator of distributed transaction
Contd.
Client starts a transaction by sending a
opentransaction request to a coordinator in any
server.
Coordinator carries out the request and returns
resulting transaction identifier to the client.
Identifier is unique within a distributed system
TID contains two parts:
Server identifier (IP address)
Number unique to the server
Object are called as participant
Participants are responsible for commit protocol
Atomic commit protocols
In distributed transaction comes to an end
transaction may be commit or abort.
One phase atomic commit protocol.
Two phase commit protocol
Contd.
Contd.
Contd.
contd
Contd.
Contd.
Concurrency control in D
Transn
Locking
Local manager decides to manage locks
Contd.
Time stamp ordering concurrency control
Coordinator issues unique timestamp
Timestamp consists of pair<localtime stamp,
server-id>
Optimistic concurrency control
Each transaction is validated before it allowed to
commit.
Transaction is serialized with transaction number
Distributed Deadlocks
Most deadlock detection scheme operate
by finding cycles in the transaction wait–for
graph.
Contd.
Contd.
Phantom deadlock
Detected ad deadlock but actual there is no
deadlock.
Contd.
Edge chasing
In this global wait-for graph is not constructed
Local server forward a message “probes” that
follows the graph throughout the distributed
system
Contd.
Transaction recovery
Due to atomic property transaction effects all
committed or aborted actions on objects
Durability of objects
Failure atomicity of object means objects will
recovered even after crash of server.
Task of recovery manager:
To save objects in permanent storage for committed
transaction
To restore the server’s objects after crash
To reorganize the recovery file to improve the
performance of recovery
To reclaim storage space
Intention list is prepared for all currently active
transaction.
Contd.
Contd.
Contd.
Replication
Is a technique to enhance services,
increase availability and to make fault
tolerant
Contd.
Distributed multimedia
systems
Contd.
Requirements of application
Low latency communication
Synchronous distributed state
Media synchronization
External synchronization
Contd.
Contd.
Assignment-4
Lock Implementation
Deadlocks in transaction
How to increasing concurrency in locking
scheme?
Multi-version time stamping
Performance of two phase commit protocol
Gossip architecture fro replication
CODA file system
Transaction with replicated data
Thanks

You might also like