Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6183785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:25:33+00:00 2026-05-24T01:25:33+00:00

How do atomic operations work, under the hood? Are atomic operations so-called wait-free? I’m

  • 0

How do atomic operations work, under the hood?

Are atomic operations so-called “wait-free”?

I’m seeking for a description of the “least common divisor” of atomic operations. What do all atomic operations share?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T01:25:34+00:00Added an answer on May 24, 2026 at 1:25 am

    Atomicity as a concept occurs in several places, I suspect you’re thinking about atomic operations in code, but there are other meanings.

    One fundamental property of a Database transaction is Atomicity, see a description of ACID properties of transactions.

    In this case, you have lots of database cleverness, locks, and so on, which almost certainly imply waiting when two threads of control (or two processes) want to get at the same data.

    When you come to lines of code I guess you’re thinking about a declaration (in some fictitious language)

    global int x = 7;
    

    in one thread

    x = 25000;
    
    print x;
    

    and in another

    print x;
    

    Can we say anything about what the second thread will print? We might accept either 7 or 25000, we’d be less happy to get a number that was the high order byte of 25,000 and a low order byte of 7 – which conceptually would be the result of a non-atomic integer assignment.

    Different programming languages are free to define whatever semantics they wish, it’s conceivable that some would just accept whatever natural behaviors that the CPU they work on (say 32-bit int was atomic, 64 long was not) or they might do something much cleverer, and if the CPU itself doesn’t provide atomic operations then I don’t see much alternative to some kind of waiting if they want to fake atomicity – eg. Java synchronized keyword.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Many common filesystems do not offer atomic operations, yet writing files in an atomic
GCC's recent support for atomic operations (as described here ) is great, and is
For using atomic operations in CUDA, is it necessary to include some CUDA header
These are two atomic operations: int value = 5; Object obj = new Object();
I am trying to understand atomic and non atomic operations.With respect to Operating System
Obviously, atomic operations make sure that different threads don't clobber a value. But is
Every Modern OS provides today some atomic operations: Windows has Interlocked* API FreeBSD has
How would you achieve 128-bit atomic operations in x86? Intel's System Programming Guide, Part
Microsoft offers the InterlockedCompareExchange function for performing atomic compare-and-swap operations. There is also an
Are there functions for performing atomic operations (like increment / decrement of an integer)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.