I am trying to understand deadlock and lock wait situation.lets take a example where two or more process ids are in lock-wait mode. What happens to them according to execution point of view. will application be continue to execute and will keep trying to acquire the locks and execution speed may be slow a bit.
Deadlock is process A locks resource X. Process B locks resource Y. Process A wants Resource Y, but waits for lock from B. Process B wants resource X. This is a deadlock. DB2 will pick one of A or B and rollback the transaction, so the other one can continue.
Lock Wait is process A locks resource X. Process B wants resource X. It will wait until one of the following conditions are met. Process A releases the lock. Process B waits too long and times out based on parameter (this can be set to never timeout). Db2 kills transaction for reason of a deadlock.