Deadlock
Deadlock
Deadlock
:
Deadlock
= a
state
of
execution
where
2 or more transactions
are
unable
to proceed
because the
transactions involved
are
waiting
of
each other's
locks
Example:
Consider
the
following 2 transactions
:
A
possible
interleaved execution
(that
obeys
the
locking rules
) is:
2PL and deadlocks
Fact:
2PL
can
not
prevent
deadlocks
Evidence:
In the
example
above
,
both transactions
are
2PL
However
, their
execution
resulted in
deadlock
Resolving deadlocks
Deadlock
detection
and
deadlock
resolution
are
topics
in the
next
chapter
.....
In
this
chapter
, we
focus
on
ensuring
serializability