Subject: [Boost-bugs] [Boost C++ Libraries] #8094: hierarchical_mutex for lock hierarchies (to avoid deadlocks)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-02-17 21:24:36
#8094: hierarchical_mutex for lock hierarchies (to avoid deadlocks)
--------------------------------------------------+-------------------------
Reporter: Fredrik Orderud <forderud@â¦> | Owner: anthonyw
Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: thread
Version: Boost 1.52.0 | Severity: Optimization
Keywords: |
--------------------------------------------------+-------------------------
It would be great if boost::thread could be extended with a "hierarchical"
mutex to facilitate lock hierarchies. Lock hierarchies is a construct that
associates mutexes with software layer numbers, and enforces the
application to only lock "downwards" in the software hierarchy [1]. This
effectively translates potential deadlocks into deterministic run-time
failures that be detected during testing.
An example draft implementation is attached. The attachment also includes
a BOOST_THREAD_LOCAL work-around for missing "thread_local" support that
should probably be moved to more neutral ground.
[1] http://www.drdobbs.com/parallel/use-lock-hierarchies-to-avoid-
deadlock/204801163
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8094> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:12 UTC