About: Compare-and-swap     Goto   Sponge   NotDistinct   Permalink

An Entity of Type : dbo:ProgrammingLanguage, within Data Space : dbpedia.demo.openlinksw.com associated with source document(s)
QRcode icon
http://dbpedia.demo.openlinksw.com/describe/?url=http%3A%2F%2Fdbpedia.org%2Fresource%2FCompare-and-swap

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 fail. The result of the operation must indicate whether it performed the substitution; this can be done either with a simple boolean response (this variant is often called compare-and-set), or by returning the value read from the memory location (not the value written to it).

AttributesValues
rdf:type
rdfs:label
  • Compare-and-swap (de)
  • Comparar e intercambiar (es)
  • Compare-and-swap (en)
  • Compare-and-swap (fr)
  • コンペア・アンド・スワップ (ja)
  • Compare-and-swap (pl)
  • Сравнение с обменом (ru)
  • Compare-and-swap (sv)
  • Compare-and-swap (uk)
  • 比较并交换 (zh)
rdfs:comment
  • 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 fail. The result of the operation must indicate whether it performed the substitution; this can be done either with a simple boolean response (this variant is often called compare-and-set), or by returning the value read from the memory location (not the value written to it). (en)
  • Comparar e intercambiar, también conocido por las siglas CAS (del inglés Compare And Swap), es una operación atómica usada en el diseño de algoritmos concurrentes para permitir la sincronización de hilos de ejecución sin recurrir a bloqueos de los mismos.​ (es)
  • コンペア・アンド・スワップ(Compare-and-Swap、CAS)は、CPUの特別な命令の一種。不可分操作として、あるメモリ位置の内容と指定された値を比較し、等しければそのメモリ位置に別の指定された値を格納する。この操作の結果、置換が行われたかどうかを示す必要があり、単純な真理値を返すか、そのメモリ位置から読み込んだ内容(書き込んだ内容ではない)を返す。 CAS命令は、マルチプロセッサシステムでセマフォなどを実装するのに使われる。マルチプロセッサシステムでLock-freeとWait-freeアルゴリズムを実装するのにも使われる。 Maurice Herlihy (1993年) は、CAS命令が単なるリード、ライトやテスト・アンド・セットでは実装できないことを示した。 (ja)
  • Compare-and-swap, CAS (porównaj i zamień) – operacja atomowa stosowana w wielowątkowych procesach w celu synchronizacji. Jej działanie polega na porównaniu zawartości pewnej lokacji w pamięci z zadaną wartością a następnie, jeśli obie wartości są równe, jej zmodyfikowaniu do nowej wartości. Niepodzielność operacji zapewnia, że nowa wartość jest wyznaczona na podstawie aktualnych danych. Jeśli wartość zostałaby w międzyczasie zmodyfikowana przez inny wątek to zapis by się nie powiódł. Wynik operacji musi wskazywać, czy działanie zapisu zostało wykonane czy nie. Może to być prosty typ logiczny lub zwracanie wartości odczytanej z podanej lokacji (lecz nie zapisanej). (pl)
  • Сравнение с обменом (англ. compare and set, compare and swap, CAS) — атомарная инструкция, сравнивающая значение в памяти с одним из аргументов, и в случае успеха записывающая второй аргумент в память. Поддерживается в семействах процессоров x86, Itanium, Sparc и других. (ru)
  • 比较并交换(compare and swap, CAS),是原子操作的一种,可用于在多线程编程中实现不被打断的数据交换操作,从而避免多线程同时改写某一数据时由于执行顺序不确定性以及中断的不可预知性产生的数据不一致问题。该操作通过将内存中的值与指定数据进行比较,当数值一样时将内存中的数据替换为新的值。 (zh)
  • Compare-and-Swap (CAS, englisch für Vergleichen und Tauschen) ist eine atomare Operation in der Informatik, um Locking- und Synchronisationsoperationen zu implementieren. Eine Speicherstelle wird mit einem vorgegebenen Wert verglichen, und bei Übereinstimmung mit einem neuen Wert überschrieben. Am Rückgabewert muss abzulesen sein, ob der Tausch ausgeführt wurde. Die CAS-Instruktion ist eine atomare Operation der CPU, d. h. ihr Ablauf kann und darf von keiner anderen Operation unterbrochen werden. Auf Intel-x86- und -Itanium-Prozessoren ist dies die CMPXCHG-Instruktion. (de)
  • Compare-and-swap (CAS) est une instruction atomique utilisée dans les systèmes multiprocesseurs ou multi-cœurs utilisant une mémoire partagée. Elle compare la valeur stockée à une adresse mémoire donnée à l'un de ses arguments et, en cas d'égalité, écrit une nouvelle valeur à cette adresse. Selon les implémentations, elle signale si l'écriture a réussi soit en renvoyant une valeur booléenne, soit en renvoyant la valeur lue en mémoire. (fr)
  • I datavetenskapen är compare-and-swap (ungefär: jämför-och-byt ut, ofta förkortat CAS) en CAS(M, V, N) som används i program med flera parallella processer eller trådar för att uppnå synkronisering. Operationen jämför värdet i en minnescell med adressen M med ett givet värde V. Endast om värdet i minnescellen är samma som V ändras värdet i minnescellen till det givna nya värdet N. De ovanstående stegen utförs som en enda atomär operation; andra trådar garanteras inte kunna uppdatera minnescellen M. Operationen måste slutligen rapportera huruvida det önskade värdet verkligen blev uppdaterat i minnescellen. Detta kan göras antingen med en boolesk variabel (denna variant kallas ofta compare-and-set), eller genom att återvända det värdet som fanns i M innan operationen påbörjades (inte värdet (sv)
  • Інструкція compare-and-swap (CAS) використовується в інформатиці як атомарна (тобто безперервна) операція для такої послідовності дій: порівняння значення у пам'яті із заданим значенням і якщо вони рівні, то запис у пам'ять нового значення. Ця інструкція може використовуватись для реалізації таких примітивів синхронізації, як семафор та м'ютекс, а також для алгоритмів без блокувань. CAS еквівалентна , в тому сенсі, що існує алгоритм без блокувань з фіксованою кількістю викликів однієї з них, що реалізує функціональність іншої. Операція CAS може застосовуватись для реалізації . (uk)
dcterms:subject
Wikipage page ID
Wikipage revision ID
Link from a Wikipage to another Wikipage
Link from a Wikipage to an external page
sameAs
dbp:wikiPageUsesTemplate
Faceted Search & Find service v1.17_git139 as of Feb 29 2024


Alternative Linked Data Documents: ODE     Content Formats:   [cxml] [csv]     RDF   [text] [turtle] [ld+json] [rdf+json] [rdf+xml]     ODATA   [atom+xml] [odata+json]     Microdata   [microdata+json] [html]    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 08.03.3330 as of Mar 19 2024, on Linux (x86_64-generic-linux-glibc212), Single-Server Edition (378 GB total memory, 59 GB memory in use)
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2024 OpenLink Software