Probably the simplest example of a deadlock is when a
process (A) is waiting on data from process B before it
can continue.
At the same time process B is waiting on data from process
A before it can continue. Both processes are waiting
on
each other, and neither will ever move forward. Deadlocks
generally occur in
much more complicated scenarios. Deadlocks occur when
multiple processes are
waiting for resources (IO ports, data from other
processes, etc...)
and already have
some resources allocated to them that they will not
free up
until they get the new resources they need.
Deadlocks
aren't
very common at an application level, but OS programmers
must be very careful
to avoid them.