Optimistic concurrency control

Optimistic concurrency control is a technique used for concurrency.

  • It is used in databases and internally by concurrent data structure libraries
  • It assumes that actions will generally complete without contention, so proceeds to perform the update immediately, then checks afterwards if the action can be committed or must be rolled back
  • Avoiding the use of locks provides a performance boost, especially for .NET code where a lock could require an expensive entry into kernel mode
  • Care must be taken in use and implementation, as high load can lead to increased contention, which increases the load etc.

 

Wikipedia

Advertisements