"I am wondering if any could tell me how mandrake prevents deadlock conditions?""
The logic of how to prevent deadlock conditions is common to all software. Mandriva has to follow the same logic rules as anybody else.
I use the term variable to mean the name that is used to describe a lockable resource. When all processes access a variable as read only then no locks are necessary. When any process updates a variable then all process that read the variable must lock on the variable as read only and all processes that update the variable must lock on the variable as exclusive.
When processes lock on more than one variable then all processes that lock on more than one variable must follow one of these rules:
1. All processes must lock on all of the variables they need in a single system call. For example is a variable is locking on A, C, J, and X then it must lock on (A, C, J, and X) in a single system call.
2. All processes which lock on more than one variable must do so in the same order. For example if several processes are locking on some or all of A, C, J, and X they can do so one variable at a time provided that they all lock on variables in the same agreed on order. For example they could agree on the order J, A, X, C.
3. It is possible to combine rules 1 and 2 and agree that some variables can be used as a multiple call within an agreed on series. For example the process could agree to always lock on A, C, J, and X in the 3 step series:
A, (C & X), J.