---
title: "#compare-and-swap articles | Hashnode"
description: "Explore 3 articles tagged #compare-and-swap on Hashnode. Tutorials, guides, and how-tos from the community."
url: "https://hashnode.com/tag/compare-and-swap"
---

Tag

# #compare-and-swap

3 posts · 0 followers

[Gautam Patel](https://hashnode.com/@iamgautam03) · [Nov 14](https://hashnode.com/posts/compare-and-swap-cas-understanding-atomic-operations-in-concurrent-programming/6af867731bb7cbd2ecbde62d)

### [Compare-and-Swap (CAS): Understanding Atomic Operations in Concurrent Programming](https://iamgautam.hashnode.dev/compare-and-swap-cas-understanding-atomic-operations-in-concurrent-programming?utm_source=hashnode&utm_medium=feed)

Understand how Compare-and-Swap (CAS) works, prevents race conditions, and enables atomic updates in concurrent programming.

9 min read · [iamgautam.hashnode.dev](https://iamgautam.hashnode.dev/compare-and-swap-cas-understanding-atomic-operations-in-concurrent-programming?utm_source=hashnode&utm_medium=feed)

[Abstract Algorithms](https://hashnode.com/@abstractalgorithms) · [Apr 17](https://hashnode.com/posts/compare-and-swap-optimistic-locking/69e26438013bfd2e26f3f74f)

### [Compare-and-Swap and Optimistic Locking: How Every Database Implements It](https://abstractalgorithms.hashnode.dev/compare-and-swap-optimistic-locking?utm_source=hashnode&utm_medium=feed)

From the CMPXCHG CPU instruction to DynamoDB ConditionExpressions and Cassandra LWT — how CAS and optimistic locking work across every major database.

34 min read · [abstractalgorithms.hashnode.dev](https://abstractalgorithms.hashnode.dev/compare-and-swap-optimistic-locking?utm_source=hashnode&utm_medium=feed)

[Chetan Datta](https://hashnode.com/@chetan77) · [Jul 9, 2024](https://hashnode.com/posts/27-java-multithreading-4-atomic-variables/668d7f2d7298bacf6e7a5c31)

### [27 Java - Multithreading 4 (Atomic Variables)](https://chetan77.hashnode.dev/27-java-multithreading-4-atomic-variables?utm_source=hashnode&utm_medium=feed)

Concurrency Types Concurrency can be achieved using 2 ways Lock based Mechanism Synchronized Reentrant Stamped ReadWrite Semaphores Lock Free Mechanism CAS Operation (Compare-and Swap) AtomicInteger AtomicBoolean AtomicLong AtomicReference...

6 min read · [chetan77.hashnode.dev](https://chetan77.hashnode.dev/27-java-multithreading-4-atomic-variables?utm_source=hashnode&utm_medium=feed)
