December 2011 Archives

In the previous tutorial I showed how LID and LIA, our deadlock detection tools, could be used to pinpoint lock inversions and show you deadlocks which are lurking in your code. The examples used were very simple, with only the two locks involved in each lock acquisition sequence. Real code is seldom so clean.

Real world code's use of locks can be surprisingly complex; object oriented encapsulation hides the use of locks inside of objects and layered designs may use locks in the layers that call into your code and may use locks in the layers that you call into. Deadlocks caused by lock inversions involve two locks but there may be many more locks being used by the code that causes the lock inversion. Our tools build graphs of the locks that are taken by your code and then search those graphs for lock inversions. Once problems are found we reduce the graphs to just the locks that cause the problem, stripping away complexity and exposing the details that let you remove the potential deadlock from your code. An example probably helps...

About this Archive

This page is an archive of entries from December 2011 listed from newest to oldest.

November 2011 is the previous archive.

January 2012 is the next archive.

This is where we write about the development of Lock Explorer, a suite of tools for locating lock inversions, finding deadlocks before they happen and investigating lock usage, contention and performance in multi-threaded code.

Find recent content on the main index or look in the archives to find all content.