LockBasedSynchronization

Last edit July 22, 2009
Also known as PessimisticLocking.

Typical synchronization techniques are LockBasedSynchronization:

  • Semaphores,
  • Monitors, or
  • Messages (like using regular queues, but interprocess).

This division is most noticed in Unix, except that instead of Monitors, Unix has SharedMemory, which is just a communication mechanism which requires synchronization.

JavaLanguage has monitors and nothing else. This is because Monitors are easier to use and they look a lot like classes. Besides, any of the three can be implemented using either of the other two.

And then LockFreeSynchronization was born.


Advanced LockBasedSynchronization: RendezVous, ReadWriteLock.


See: SynchronizationStrategies