In a nutshell, a deadlock is just a special blocking case when multiple sessions or, sometimes, even multiple execution threads within a single session block each other.
Classic deadlock occurs when two or more sessions are competing for the same set of resources. Let’s look at a by-the-book example and assume that you have two sessions updating the table. As the first step, session 1 updates the row R1 and session 2 updates the row R2. You know that at this point both sessions acquire and hold exclusive (X) lock on the rows. You can see this happening in Figure 19-1.
Figure 19-1. Classic deadlock, Step ...