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

  • Home
  • SEARCH
  • 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 8033521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:43:32+00:00 2026-06-05T01:43:32+00:00

from c++11 29.3-p3: There shall be a single total order S on all memory_order_seq_cst

  • 0

from c++11 29.3-p3:

There shall be a single total order S on all memory_order_seq_cst operations, consistent with the "happens before" order and modification orders for all affected locations, such that each memory_order_seq_cst operation B that loads a value from an atomic object M observes either one of the following values:

— the result of the last modification A of M that precedes B in S, if it exists, or

— if A exists, the result of some modification of M in the visible sequence of side effects with respect to B that is not memory_order_seq_cst and that does not happen before A, or

— if A does not exist, the result of some modification of M in the visible sequence of side effects with respect to B that is not memory_order_seq_cst.

[ Note: Although it is not explicitly required that S include locks, it can always be extended to an order that does include lock and unlock operations, since the ordering between those is already included in the "happens before" ordering. –end note ]

In the last note, what does it mean by "always"?
I can understand that any certain implementation can be designed to support such an extended S. But in some general implementation that wasn’t designed for it, I don’t see that S can be extended with the described properties.

Does it mean an extended order that also satisfies the same visibility properties here?

I had sent this question to comp.std.c++ but got no answers there. http://groups.google.com/group/comp.std.c++/browse_frm/thread/5242fa70d0594d1b#

  • 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-06-05T01:43:33+00:00Added an answer on June 5, 2026 at 1:43 am

    What does it mean by “always”?

    Always means that there exists a total order S+l on seq_cst ops U lock ops that is consistent with happens-before and S.

    Why is that

    Fact 1: S is a total order consistent with HB.

    Fact 2: Lock operations are ordered in the HB partial order, because they are acquire/release operations.

    Fact 3: There are no cycles in HB.

    Lemma 1: There are no cycles in S' = S union HB.

    Proof: If there were any cycles in S', they would be in the form Aop1 <S Aop2 <HB Aop1, because any two atomic operations are comparable in S and happens-before is transitive. That would contradict with Fact 1. QED

    Conclusion: Because for each partial order (= without cycles) there exists its extension to total order (cf. topological sorting), there is a total order extending S'. So you just pick atomics and lock operations from it and get S+l.

    But in some general implementation that wasn’t designed for it, I don’t see that S can be extended so.

    Such an implementation would not satisfy mem_order_seq_cst requirements.

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

Sidebar

Related Questions

Is there a better way to change few images from a single file which
is there any small working program for recieving from and sending data to client
Is there a portable way to run a python script from a shell without
i got a page users downloading files from there.And when a user click download
I'm using the facedetect example and going from there. Right now it only detects
I am compiling a latex file on a server and download from there the
I've downloaded memcache.php version 3.0.6 from there and out of the box (after defining
I am trying to create a GUI using java swing. From there I have
I have some path c:\server\folderName1\another name\something\another folder\ . How i can extract from there
Is there anyway from a C prog to find whether the OS is currently

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.