[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[platform-core-dev] Concerns regarding deadlock avoidance
|
Hi everyone!
Taking a look at how the avoidance of deadlocks is implemented, I was
wondering whether this kind of implementation really works out. If I
understand the code correctly, ordering of locks if forced by (eventually)
releasing locks that a thread already holds. Although this assures that
there are no deadlocks, I think this is likely to break the integrity of
data structures that were protected by the released lock. A contending
thread might gain access to data that e.g. is in an incomplete state.
If for example the lock is used to protect a cache, it might happen that a
thread that is modifying the cache in transactional way is loosing the lock,
thus allowing another thread to read dirty data.
Is this really intended or am I just missing an obvious piece information?
Cheers,
Boris
--
"Engineering does not require science. Science helps a lot but
people built perfectly good brick walls long before they knew why
cement works." - Alan Cox