PCP 'Thread 1 SyncLock LeftVal SyncLock RightVal 'Perform operations on LeftVal and RightVal that require read and write. End SyncLock 'Thread 2 SyncLock RightVal SyncLock LeftVal 'Perform operations on RightVal and LeftVal that require read and write. End SyncLock
Set priority to each critical section Use S0-> J0(H)-> priority of S0 = P0(J0) S1-> J2 J1(H)-> priority of S1= P1(J1) S2-> J2 J1(H)-> priority of S2= P1(J1)
Deal with chain blocking BIP ta : J0 -> X J1 -> (attempt to lock S2)P1< SC(P0) J2 -> J2 -> inherit -> P1 (exe) SC -> (P0, J2(S1))
It showed that both protocols solve the uncontrolled priority inversion problem. In particular, the priority ceiling protocol prevents deadlocks and reduces the blocking to at most one critical section.