Non-blocking algorithm: Difference between revisions

Content deleted Content added
m Implementation: Remove redundant |year= parameter from CS1 citations; using AWB
m Copyediting
Line 18:
Other problems are less obvious. For example, certain interactions between locks can lead to error conditions such as [[deadlock]], [[livelock]], and [[priority inversion]]. Using locks also involves a trade-off between coarse-grained locking, which can significantly reduce opportunities for [[parallel computing|parallelism]], and fine-grained locking, which requires more careful design, increases locking overhead and is more prone to bugs.
 
NonUnlike blocking algorithms, non-blocking algorithms do not suffer from these downsides, and in addition are also safe for use in [[interrupt handler]]s: even though the [[Pre-emptive multitasking|preempted]] thread cannot be resumed, progress is still possible without it. In contrast, global data structures protected by mutual exclusion cannot safely be accessed in an interrupt handler, as the preempted thread may be the one holding the lock.
 
A lock-free data structure can be used to improve performance.