Movatterモバイル変換


[0]ホーム

URL:


MM
Uploaded bymridul mishra
PPTX, PDF15,829 views

Optimistic concurrency control in Distributed Systems

This document discusses optimistic concurrency control, which is a concurrency control method that assumes transactions can frequently complete without interfering with each other. It operates by allowing transactions to access data without locking and validating for conflicts before committing. The validation checks if other transactions have read or written the same data. If a conflict is found, the transaction rolls back and restarts. The document outlines the basic algorithm, phases of transactions (read, validation, write), and advantages like low read wait time and easy recovery from deadlocks and disadvantages like potential for starvation and wasted resources if long transactions abort.

In this document
Powered by AI

Introduction to Optimistic Concurrency Control (OCC) by Mridul K. Mishra.

OCC is a method for handling conflicts in multi-user systems, allowing transactions to operate without locks while checking for interference before committing.

OCC is suited for large systems with minimal conflicting operations and tolerable temporary inconsistencies.

OCC reduces the complexity of locks and mitigates potential conflicts in a transaction.

Developed by Kung and Robinson, OCC operates under the assumption of low conflict probability, minimizing resource lock time.

Details of OCC's three phases: Read Phase (unrestricted), Validation Phase (integrity check), and Write Phase (global updates).

Read operations are immediate; write operations are tentative until validation. Upon validation, writes become global.

Strong validation checks for integrity, crucial for long transactions, using a method to avoid deadlocks.

Describes validation rules to ensure transaction isolation among concurrent processes.

Advantages include low wait times for read resources, easy deadlock recovery, and maintaining consistency in read-write transactions.

Disadvantages include potential process starvation, resource wastage during long transaction aborts, and concurrency limitations with writes.

Cites sources such as Google and Wikipedia.

Final thank you note from the presenter.

Embed presentation

Downloaded 139 times
Optimistic ConcurrencyControl- BY MRIDUL K. MISHRA(170303201015)
What is It? Concurrency control is a concept that is used to address conflicts with thesimultaneous accessing or altering of data that can occur with a multi-usersystem. Optimistic concurrency control (OCC) is a concurrency control method appliedto transactional systems. OCC assumes that multiple transactions can frequentlycomplete without interfering with each other. While running, transactions use dataresources without acquiring locks on those resources. Before committing, eachtransaction verifies that no other transaction has R/W the data it has R/W. If thecheck reveals conflicting modifications, the committing transaction rolls back andcan be restarted.
 In context of DS, it can be advantageous to apply to systems which are very largeand mostly involve resource accesses which don’t alter data in resource. In otherwords, this should be applied to systems that are immune to conflictingoperations. Its applied to systems that are willing to accept/tolerate temporary inconsistenciesand deadlocks.
Why is it used? It is expensive and complicated to implement locks on resources, and it alsoreduces the concurrency of operations. It neutralises the effects of conflicts(if any).
How is it implemented? The basic algorithm for OCC was designed by H.T. Kung and John Robinson. Approach is called ”Optimistic”, because it is based on the observation that, inmost applications, the likelihood of two transactions accessing the same object islow. The approach “hopes” that conflicts do not occur and transactions are allowed toproceed as though there were no possibility of conflict. Objective is to minimize the time over which a given resource would beunavailable for use by other transactions
Algorithm Since reading a value or a pointer from a node can never cause a loss of integrity,reads are completely unrestricted Writes are highly restricted. Transactions consist of three phases: Read Phase: Resources can be read freely. All writes take place on local copiesof the object to be modified i.e. a local updated copy is created. Validations Phase: The step in which it is determined that the transaction willnot cause a loss of integrity. i.e. if any R-W or W-R anomaly occurs Write Phase: Copies are made global, if the data is consistent the file is updated.
Read & Write Phase Read is also referred to as the “Working Phase” Each transaction has a tentative version of each of the object that it updates READ operations are performed immediately WRITE operations record the new values of the objects as tentative values Two records are kept of the objects accessed within a transaction: a read set and awrite set
 If validation succeeds, then the transaction enters the write phase After write phase, all written values become “global” When a transaction completes, it will request its validation and write phases viatransactionEnd’ call
Validation Phase Uses a particularly strong form of validation, is also responsible for deadlockprevention. This is especially important with long-running transactions Method uses an overqualified update scheme to test whether the underlying datasource has been updated by another transaction since the beginning of thecurrent transaction Kung and Robinson employ Serial Equivalence for verifying the correctness ofconcurrent execution of transactions.
Validation Rules:T1 T2 RuleWrite Read T2 must not access data being altered by T1.Read Write T1 must not read data being altered by T2.Write Write T2 must not alter data altered by T1 vice-versa.
Advantages The waiting time to Read a resource is very low. Deadlocks can be very easily recovered(by validation phase). Read-only transactions can run concurrently with updating transactions withoutloss of database consistency. Never lead to cascaded aborts.
Disadvantages: Can lead to starvation of process that want to alter the contents of a resource. Aborting the long transactions in validation phase wastes a lot of systemresources. Since one transaction cant access resource of other ones, it limits concurrencywhen write function is involved.
Refernces Google.com Wikipedia
Thank You

Recommended

PPTX
Concurrency Control in Distributed Systems.pptx
PPTX
Transactions and Concurrency Control
PPTX
Concurrency Control in Distributed Database.
PPTX
Distributed concurrency control
PPT
Chapter 6-Consistency and Replication.ppt
PPTX
Message and Stream Oriented Communication
PPT
message passing
PDF
Middleware and Middleware in distributed application
PPTX
Introduction to Distributed System
PPTX
Server system architecture
PDF
Distributed deadlock
DOC
Naming in Distributed System
PPT
Client Centric Consistency Model
PPTX
Message passing in Distributed Computing Systems
PPTX
Replication in Distributed Systems
PPTX
Locks In Disributed Systems
PPTX
Distributed file system
PPT
Process Management-Process Migration
PPT
System models in distributed system
PPTX
Design Goals of Distributed System
PDF
management of distributed transactions
PPT
Two phase commit protocol in dbms
PPTX
Fault tolerance in distributed systems
PPTX
Timestamp based protocol
PPTX
Distributed transaction
PPT
Directory and discovery services
PPT
Synchronization in distributed systems
PPTX
Load Balancing in Parallel and Distributed Database
PPTX
Concurrency control
PPT
Database concurrency control & recovery (1)

More Related Content

PPTX
Concurrency Control in Distributed Systems.pptx
PPTX
Transactions and Concurrency Control
PPTX
Concurrency Control in Distributed Database.
PPTX
Distributed concurrency control
PPT
Chapter 6-Consistency and Replication.ppt
PPTX
Message and Stream Oriented Communication
PPT
message passing
PDF
Middleware and Middleware in distributed application
Concurrency Control in Distributed Systems.pptx
Transactions and Concurrency Control
Concurrency Control in Distributed Database.
Distributed concurrency control
Chapter 6-Consistency and Replication.ppt
Message and Stream Oriented Communication
message passing
Middleware and Middleware in distributed application

What's hot

PPTX
Introduction to Distributed System
PPTX
Server system architecture
PDF
Distributed deadlock
DOC
Naming in Distributed System
PPT
Client Centric Consistency Model
PPTX
Message passing in Distributed Computing Systems
PPTX
Replication in Distributed Systems
PPTX
Locks In Disributed Systems
PPTX
Distributed file system
PPT
Process Management-Process Migration
PPT
System models in distributed system
PPTX
Design Goals of Distributed System
PDF
management of distributed transactions
PPT
Two phase commit protocol in dbms
PPTX
Fault tolerance in distributed systems
PPTX
Timestamp based protocol
PPTX
Distributed transaction
PPT
Directory and discovery services
PPT
Synchronization in distributed systems
PPTX
Load Balancing in Parallel and Distributed Database
Introduction to Distributed System
Server system architecture
Distributed deadlock
Naming in Distributed System
Client Centric Consistency Model
Message passing in Distributed Computing Systems
Replication in Distributed Systems
Locks In Disributed Systems
Distributed file system
Process Management-Process Migration
System models in distributed system
Design Goals of Distributed System
management of distributed transactions
Two phase commit protocol in dbms
Fault tolerance in distributed systems
Timestamp based protocol
Distributed transaction
Directory and discovery services
Synchronization in distributed systems
Load Balancing in Parallel and Distributed Database

Similar to Optimistic concurrency control in Distributed Systems

PPTX
Concurrency control
PPT
Database concurrency control & recovery (1)
PPTX
Concurrent control
PPTX
DBMS Presentation.pptx
PDF
CONCURRENCY CONTOL notes.pdf
PPTX
protocols of concurrency control
PDF
Advanced Database Chapter 4.pdf shnsbxlajmndm woweosmkl m,xcnkl C NOOxcx xcbnxc
PPTX
Transaction management transparencies
PPT
Concurrency (Distributed computing)
PPTX
DBMS Pravin concurrency control technique.pptx
PPTX
DBMS Session 6 Transactions Management and Concurrency Control.pptx
PPTX
UNIT IV DIS.pptx
PPTX
Concurrency control
PPTX
Chapter_NINE_Concurrency_Control_DBMS.pptx
PPTX
L12 Concurrent Programming
DOC
Concurrency control
PPT
Data base management system Transactions.ppt
PPT
Data concurrency means that many users can access data at the same time
DOC
White Paper On ConCurrency For PCMS Application Architecture
PPT
Transactions in the databse management and computer science.ppt
Concurrency control
Database concurrency control & recovery (1)
Concurrent control
DBMS Presentation.pptx
CONCURRENCY CONTOL notes.pdf
protocols of concurrency control
Advanced Database Chapter 4.pdf shnsbxlajmndm woweosmkl m,xcnkl C NOOxcx xcbnxc
Transaction management transparencies
Concurrency (Distributed computing)
DBMS Pravin concurrency control technique.pptx
DBMS Session 6 Transactions Management and Concurrency Control.pptx
UNIT IV DIS.pptx
Concurrency control
Chapter_NINE_Concurrency_Control_DBMS.pptx
L12 Concurrent Programming
Concurrency control
Data base management system Transactions.ppt
Data concurrency means that many users can access data at the same time
White Paper On ConCurrency For PCMS Application Architecture
Transactions in the databse management and computer science.ppt

Recently uploaded

PPTX
TRANSPORTATION ENGINEERING Unit-5.1.pptx
PPTX
Ship Repair and fault diagnosis and restoration of system back to normal .pptx
PDF
Why Buildings Crumble Before Their Time And How We Can Build a Legacy
PPTX
Generative AI Deep Dive: Architectures, Mechanics, and Future Applications
PPTX
Computer engineering for collage studen. pptx
PPTX
introduction-to-maintenance- Dr. Munthear Alqaderi
PDF
Soil Permeability and Seepage-Irrigation Structures
PPTX
waste to energy deck v.3.pptx changing garbage to electricity
PDF
Small Space Big Design - Amar DeXign Scape
PDF
Best Marketplaces to Buy Snapchat Accounts in 2025.pdf
PDF
@Regenerative braking system of DC motor
PDF
Welcome to ISPR 2026 - 12th International Conference on Image and Signal Pro...
PPTX
Principles of Energy Efficiency_ Doing More with Less
PDF
application of matrix in computer science
PPTX
K-nearest neighbouring machine learing algorithm .pptx
PDF
Advancements in Telecommunication for Disaster Management (www.kiu.ac.ug)
PPTX
Lead-acid battery.pptx.........................
PDF
Grade 11 Quarter 3 Gravitational Potentional Energy
PPTX
2-Photoelectric effect, phenomena and its related concept.pptx
PPT
399-Cathodic-Protection-Presentation.ppt
 
TRANSPORTATION ENGINEERING Unit-5.1.pptx
Ship Repair and fault diagnosis and restoration of system back to normal .pptx
Why Buildings Crumble Before Their Time And How We Can Build a Legacy
Generative AI Deep Dive: Architectures, Mechanics, and Future Applications
Computer engineering for collage studen. pptx
introduction-to-maintenance- Dr. Munthear Alqaderi
Soil Permeability and Seepage-Irrigation Structures
waste to energy deck v.3.pptx changing garbage to electricity
Small Space Big Design - Amar DeXign Scape
Best Marketplaces to Buy Snapchat Accounts in 2025.pdf
@Regenerative braking system of DC motor
Welcome to ISPR 2026 - 12th International Conference on Image and Signal Pro...
Principles of Energy Efficiency_ Doing More with Less
application of matrix in computer science
K-nearest neighbouring machine learing algorithm .pptx
Advancements in Telecommunication for Disaster Management (www.kiu.ac.ug)
Lead-acid battery.pptx.........................
Grade 11 Quarter 3 Gravitational Potentional Energy
2-Photoelectric effect, phenomena and its related concept.pptx
399-Cathodic-Protection-Presentation.ppt
 

Optimistic concurrency control in Distributed Systems

  • 1.
    Optimistic ConcurrencyControl- BYMRIDUL K. MISHRA(170303201015)
  • 2.
    What is It?Concurrency control is a concept that is used to address conflicts with thesimultaneous accessing or altering of data that can occur with a multi-usersystem. Optimistic concurrency control (OCC) is a concurrency control method appliedto transactional systems. OCC assumes that multiple transactions can frequentlycomplete without interfering with each other. While running, transactions use dataresources without acquiring locks on those resources. Before committing, eachtransaction verifies that no other transaction has R/W the data it has R/W. If thecheck reveals conflicting modifications, the committing transaction rolls back andcan be restarted.
  • 3.
     In contextof DS, it can be advantageous to apply to systems which are very largeand mostly involve resource accesses which don’t alter data in resource. In otherwords, this should be applied to systems that are immune to conflictingoperations. Its applied to systems that are willing to accept/tolerate temporary inconsistenciesand deadlocks.
  • 4.
    Why is itused? It is expensive and complicated to implement locks on resources, and it alsoreduces the concurrency of operations. It neutralises the effects of conflicts(if any).
  • 5.
    How is itimplemented? The basic algorithm for OCC was designed by H.T. Kung and John Robinson. Approach is called ”Optimistic”, because it is based on the observation that, inmost applications, the likelihood of two transactions accessing the same object islow. The approach “hopes” that conflicts do not occur and transactions are allowed toproceed as though there were no possibility of conflict. Objective is to minimize the time over which a given resource would beunavailable for use by other transactions
  • 6.
    Algorithm Since readinga value or a pointer from a node can never cause a loss of integrity,reads are completely unrestricted Writes are highly restricted. Transactions consist of three phases: Read Phase: Resources can be read freely. All writes take place on local copiesof the object to be modified i.e. a local updated copy is created. Validations Phase: The step in which it is determined that the transaction willnot cause a loss of integrity. i.e. if any R-W or W-R anomaly occurs Write Phase: Copies are made global, if the data is consistent the file is updated.
  • 7.
    Read & WritePhase Read is also referred to as the “Working Phase” Each transaction has a tentative version of each of the object that it updates READ operations are performed immediately WRITE operations record the new values of the objects as tentative values Two records are kept of the objects accessed within a transaction: a read set and awrite set
  • 8.
     If validationsucceeds, then the transaction enters the write phase After write phase, all written values become “global” When a transaction completes, it will request its validation and write phases viatransactionEnd’ call
  • 9.
    Validation Phase Usesa particularly strong form of validation, is also responsible for deadlockprevention. This is especially important with long-running transactions Method uses an overqualified update scheme to test whether the underlying datasource has been updated by another transaction since the beginning of thecurrent transaction Kung and Robinson employ Serial Equivalence for verifying the correctness ofconcurrent execution of transactions.
  • 11.
    Validation Rules:T1 T2RuleWrite Read T2 must not access data being altered by T1.Read Write T1 must not read data being altered by T2.Write Write T2 must not alter data altered by T1 vice-versa.
  • 12.
    Advantages The waitingtime to Read a resource is very low. Deadlocks can be very easily recovered(by validation phase). Read-only transactions can run concurrently with updating transactions withoutloss of database consistency. Never lead to cascaded aborts.
  • 13.
    Disadvantages: Can leadto starvation of process that want to alter the contents of a resource. Aborting the long transactions in validation phase wastes a lot of systemresources. Since one transaction cant access resource of other ones, it limits concurrencywhen write function is involved.
  • 14.
  • 15.

[8]ページ先頭

©2009-2025 Movatter.jp