Compare-and-swap

id: compare-and-swap-260-4684932
title: Compare-and-swap
text: In computer science, compare-and-swap (CAS) is an atomic instruction used in multithreading to achieve synchronization. It compares the contents of a memory location with a given value and, only if they are the same, modifies the contents of that memory location to a new given value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would
brand slug: wiki
category slug: encyclopedia
description: CPU instruction to alter a value in memory only if it equals a given value
original url: https://en.wikipedia.org/wiki/Compare-and-swap
date created:
date modified: 2024-02-21T23:18:14Z
main entity: {"identifier":"Q128562","url":"https://www.wikidata.org/entity/Q128562"}
image:
fields total: 13
integrity: 14

Related Entries

Explore Next Part