December 11, 2007
Use Lock Hierarchies to Avoid DeadlockKeep it on the level: Use lock hierarchies to avoid deadlock in the code you controlHerb Sutter
Need to avoid deadlock in the code you control? Try using lock hierarchies.
Herb is a software architect at Microsoft and chair of the ISO C++ Standards committee. He can be contacted at www.gotw.ca.
In the first two Effective Concurrency columns"The Pillars of Concurrency" (DDJ, August 2007) and "How Much Scalability Do You Have or Need?" (DDJ, September 2007)we saw the three pillars of concurrency and what kinds of concurrency they express:
My last few columns have focused on Pillar 3, and I've referred to lock levels or lock hierarchies as a way to control deadlock. A number of readers have asked me to explain what those are and how they work, so I'll write one more column about Pillar 3 (for now).
|
|
||||||||||||||||||||||||||||||
|
|
![]() |
||||
![]() |
|
|||
![]() |
||||
![]() |
||||
![]() |
|
|||
![]() |
|
|||