Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch > #33663

Re: "volatile" on the Mill

Newsgroups comp.arch
Date 2016-02-15 02:18 -0800
References <n8mb5k$27c$1@dont-email.me> <n8rdid$1c1$1@dont-email.me> <n8sj2i$476$1@dont-email.me> <n8skv4$aqm$1@dont-email.me> <n8smmd$gkk$1@dont-email.me>
Message-ID <ad025fcf-d855-49d2-b5b7-e50cc26d3203@googlegroups.com> (permalink)
Subject Re: "volatile" on the Mill
From gpderetta <gpderetta@gmail.com>

Show all headers | View raw


On Wednesday, February 3, 2016 at 11:04:27 AM UTC, Nick Maclaren wrote:
> In article <n8skv4$aqm$1@dont-email.me>,
> Ivan Godard  <ivan@millcomputing.com> wrote:
> >>>>
> >>>> ...  The table
> >>>> actually understates the situation, as the zSeries memory
> >>>> model is otherwise sequentially consistent, meaning that
> >>>> all CPUs will agree on the order of unrelated stores from
> >>>> different CPUs."
> >>>
> >>> That is the definition of "total global ordering", which is *not* the
> >>> same as sequential consistency. in SC the actions of each CPU are seen
> >>> in an internally consistent order by all, but the actions of different
> >>> CPUs may be arbitrarily interleaved in different orders as seen by other
> >>> CPUs.
> >>
> >> It depends on what you mean by 'agree'.  In SC, all CPUs agree about
> >> the store ordering, except that they hold no 'opinion' about any
> >> aspects that they cannot observe.  In order to distinguish TGO from
> >> SC, there has to be an all-seeing external agent.
> >
> >Actually no. If there are two actors A and B, and A stores AS1 and then 
> >AS2 while B stores BS1 and BS2, then in SC C will always see AS1 before 
> >AS2 and BS1 before BS2, but the ordering between the A's and B's is 
> >undefined: C might see AS1/AS2/BS1/BS2, or it might see BS1/BS2/AS1/AS2, 
> >or AS1/BS1/BS2/AS2, or whatever. And, importantly, the same is true of A 
> >and B as well.
> 
> But, if they see them, they will always see compatible orderings.
> That's the very definition of sequential consistency!
> 
>     ... the result of any execution is the same as if the operations of
>     all the processors were executed in some sequential order, and the
>     operations of each individual processor appear in this sequence in
>     the order specified by its program.
> 
> That makes it very clear that, if two processors observe incompatible
> orderings, the execution is not sequentially consistent.
> 

Exactly. The ordering is of course arbitrary, but once one is "chosen", all processors must agree on it on a SC system.

For what is worth, in C++11 (I believe that C11 is similar) requires that a total *global* order exists for all SC modifications of (atomic) memory objects. This is, I believe, a non-controversial definition of SC (apart from the fact that only applies to atomic objects and not to all memory accesses in general); I believe that the Java MM uses a very similar definition.

For example, TSO processors (x86, SPARC and it seems z series) differ from SC because they can see their own stores out of order (i.e. fulfilled from the write buffer) and a store-load is required to recover SC.

Back to comp.arch | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

"volatile" on the Mill Ivan Godard <ivan@millcomputing.com> - 2016-01-31 17:10 -0800
  Re: "volatile" on the Mill nmm@wheeler.UUCP (Nick Maclaren) - 2016-02-01 07:48 +0000
    Re: "volatile" on the Mill William Edwards <willvarfar@gmail.com> - 2016-01-31 23:53 -0800
      Re: "volatile" on the Mill nmm@wheeler.UUCP (Nick Maclaren) - 2016-02-01 08:47 +0000
  Re: "volatile" on the Mill "Paul A. Clayton" <paaronclayton@gmail.com> - 2016-02-01 20:34 -0800
    Re: "volatile" on the Mill already5chosen@yahoo.com - 2016-02-02 01:36 -0800
      Re: "volatile" on the Mill Ivan Godard <ivan@millcomputing.com> - 2016-02-02 04:19 -0800
        Re: "volatile" on the Mill nmm@wheeler.UUCP (Nick Maclaren) - 2016-02-02 12:55 +0000
        Re: "volatile" on the Mill already5chosen@yahoo.com - 2016-02-02 05:16 -0800
          Re: "volatile" on the Mill "Chris M. Thomasson" <nospam@nospam.nospam> - 2016-02-03 11:55 -0800
            Re: "volatile" on the Mill "Chris M. Thomasson" <nospam@nospam.nospam> - 2016-02-08 11:10 -0800
            Re: "volatile" on the Mill gpderetta <gpderetta@gmail.com> - 2016-02-15 02:27 -0800
              Re: "volatile" on the Mill "Chris M. Thomasson" <nospam@nospam.nospam> - 2016-02-21 14:05 -0800
                Re: "volatile" on the Mill gpderetta <gpderetta@gmail.com> - 2016-02-29 07:37 -0800
                Re: "volatile" on the Mill "Chris M. Thomasson" <nospam@nospam.nospam> - 2016-03-07 15:24 -0800
          Re: "volatile" on the Mill "Chris M. Thomasson" <nospam@nospam.nospam> - 2016-02-03 12:30 -0800
        Re: "volatile" on the Mill Quadibloc <jsavard@ecn.ab.ca> - 2016-02-02 11:16 -0800
          Re: "volatile" on the Mill Quadibloc <jsavard@ecn.ab.ca> - 2016-02-02 11:18 -0800
            Re: "volatile" on the Mill already5chosen@yahoo.com - 2016-02-02 11:30 -0800
        Re: "volatile" on the Mill "Paul A. Clayton" <paaronclayton@gmail.com> - 2016-02-02 11:37 -0800
          Re: "volatile" on the Mill Ivan Godard <ivan@millcomputing.com> - 2016-02-02 15:22 -0800
            Re: "volatile" on the Mill MitchAlsup <MitchAlsup@aol.com> - 2016-02-02 16:54 -0800
              Re: "volatile" on the Mill anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-02-03 10:53 +0000
                Re: "volatile" on the Mill Quadibloc <jsavard@ecn.ab.ca> - 2016-02-03 07:19 -0800
                Re: "volatile" on the Mill Quadibloc <jsavard@ecn.ab.ca> - 2016-02-03 07:49 -0800
                Re: "volatile" on the Mill anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-02-03 16:17 +0000
                Re: "volatile" on the Mill Quadibloc <jsavard@ecn.ab.ca> - 2016-02-03 12:41 -0800
                Re: "volatile" on the Mill anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-02-04 17:03 +0000
                Re: "volatile" on the Mill Quadibloc <jsavard@ecn.ab.ca> - 2016-02-03 12:47 -0800
                Re: "volatile" on the Mill anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-02-04 17:20 +0000
            Re: "volatile" on the Mill nmm@wheeler.UUCP (Nick Maclaren) - 2016-02-03 09:59 +0000
              Re: "volatile" on the Mill Ivan Godard <ivan@millcomputing.com> - 2016-02-03 02:34 -0800
                Re: "volatile" on the Mill nmm@wheeler.UUCP (Nick Maclaren) - 2016-02-03 11:01 +0000
                Re: "volatile" on the Mill gpderetta <gpderetta@gmail.com> - 2016-02-15 02:18 -0800
                Re: "volatile" on the Mill nmm@wheeler.UUCP (Nick Maclaren) - 2016-02-15 11:41 +0000

csiph-web