Hi,
lsacm will most often be less efficient than lsa or tl2 for workloads
with little contention. Upon conflict, lsa and tl2 will systematically
abort the transaction that discovers the conflict; this simple
contention management strategy does not provide liveness guarantees
and may produce livelocks in some pathological scenarios. What lsacm
does is allow developers to specify their own contention managers and
decide upon conflict whether to abort (1) the transaction that
discovers the conflict, or (2) the transaction that currently owns the
lock. Having this flexibility comes with an overhead at runtime.
Please consider lsacm as experimental at this time. It has not been as
well tested as lsa and tl2, and it can certainly be optimized further.
Synchronized blocks have been used to simplify the implementation of
the first version, but they can be replaced by more efficient
alternatives.
Cheers,
Pascal