A obtains a write lock on item
    X, and B obtains a write lock on item Y.  Then, A requests a lock on Y,
    and B requests a lock on X.  A will wait until resource Y becomes
    available and B will wait until resource X becomes available.
    Unfortunately, because both A and B are waiting, neither will release
    the locks they hold and neither will ever obtain the resource on which
    it is waiting.  For another example, consider two transactions, A and
    B, each of which may want to modify item X