One potential way to avoid deadlocks would be to unlock critical sections if the main lock controlling the section was unlocked OR if another lock indicating the resource was unavailable was unlocked. The program could then deal with the case that the requested resource depends on another locked resource without locking up.
Dual-Locking Critical Sections
Leave a reply