Editing Linearizability
Appearance
Content that violates any copyrights will be deleted. Encyclopedic content must be verifiable through citations to reliable sources.
Latest revision | Your text | ||
Line 124: | Line 124: | ||
* [[Compare-and-swap]] writes a new value into a location only if the latter's contents matches a supplied old value. This is commonly used in a read-modify-CAS sequence: the user reads the location, computes a new value to write, and writes it with a CAS (compare-and-swap); if the value changes concurrently, the CAS will fail and the user tries again. |
* [[Compare-and-swap]] writes a new value into a location only if the latter's contents matches a supplied old value. This is commonly used in a read-modify-CAS sequence: the user reads the location, computes a new value to write, and writes it with a CAS (compare-and-swap); if the value changes concurrently, the CAS will fail and the user tries again. |
||
* [[Load-link/store-conditional]] encodes this pattern more directly: the user reads the location with load-link, computes a new value to write, and writes it with store-conditional; if the value has changed concurrently, the SC (store-conditional) will fail and the user tries again. |
* [[Load-link/store-conditional]] encodes this pattern more directly: the user reads the location with load-link, computes a new value to write, and writes it with store-conditional; if the value has changed concurrently, the SC (store-conditional) will fail and the user tries again. |
||
* In a [[database transaction]], if the transaction cannot be completed due to a concurrent operation (e.g. in a [[ |
* In a [[database transaction]], if the transaction cannot be completed due to a concurrent operation (e.g. in a [[deadlock]]), the transaction will be aborted and the user must try again. |
||
== Examples of linearizability == |
== Examples of linearizability == |