CSC/ECE 506 Spring 2012/9a mm: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
Line 3: Line 3:


===Locks===
===Locks===
Locks are a mechanism for providing concurrency control among concurrently executing processes.  Locks are important when multiple processes share data, unless in a read only manner, and also when a set of operations executed by a process must be accomplished atomically.  A multiprocessor environment that fails to provide concurrency control can suffer correctness problems as demonstrated in the figure to the left. 
[[File:correctness.jpg|400px|thumb|left|No concurrency control]]


===Monitors===
===Monitors===


===Thin Locks===
===Thin Locks===

Revision as of 13:10, 1 April 2012

Reducing Locking Overhead

Thread synchronization in a multiprocessor environment seeks to ensure memory consistency during concurrent execution. Several mechanisms exist to address synchronization and central to the solution is typically the provision of atomicity. When a thread performs a set of operations that are seen by other threads and the rest of the system as instantaneous, atomicity has been provided. The operations themselves of course are not physically instantaneous and rely upon locking other processes out of protected memory locations while critical accesses by a single thread occur. The overhead associated with providing thread synchronization can be significant, and the aim of this article is to discuss atomicity via locks and optimizations that improve locking performance.

Locks

Locks are a mechanism for providing concurrency control among concurrently executing processes. Locks are important when multiple processes share data, unless in a read only manner, and also when a set of operations executed by a process must be accomplished atomically. A multiprocessor environment that fails to provide concurrency control can suffer correctness problems as demonstrated in the figure to the left.

No concurrency control

Monitors

Thin Locks