O'Reilly logo

IBM WebSphere eXtreme Scale 6 by Anthony Chaves

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Optimistic collisions

A deadlock is a condition where two or more threads are waiting for a lock promotion on the same object due to the other threads holding a shared lock. Specifically, this happens when two threads hold an S lock on an object, and both threads then request an X lock to write changes to the object. The general case is that two threads attempt to simultaneously update a shared object resulting in lock contention because neither thread can obtain the higher-level lock it needs to write the changes.

The different locking strategies deal with this situation with some help from the developer. The optimistic locking strategy holds locks for very brief time periods. A lock is only held as long as it takes a thread to read or write ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required