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


Groups > comp.lang.c++ > #88271

Re: Christmas Quiz...

Newsgroups comp.lang.c++
Date 2022-12-27 03:42 -0800
References <tod3b8$3c8u8$4@dont-email.me>
Message-ID <cd552208-e199-4e50-9ec5-d0c3f9d7eeeen@googlegroups.com> (permalink)
Subject Re: Christmas Quiz...
From Michael S <already5chosen@yahoo.com>

Show all headers | View raw


On Monday, December 26, 2022 at 11:23:06 PM UTC+2, Chris M. Thomasson wrote:
> Imagine you are on a SPARC in RMO mode, you are programming in assembly 
> language. 

If I am not mistaken, SPARC RMO is paper spec that was never implemented
in hardware. Which does not mean that it is impossible to imagine that I am
programming it in assembler, but it takes stronger imagination than I posses.

> What memory barrier instruction is the most efficient _and_ 
> correct for use _after_ using an atomic RMW instruction to take 
> exclusive access? Think about locking a mutex... 
> 
> A: MEMBAR #LoadLoad 
> 
> B: MEMBAR #LoadStore | #LoadLoad 
> 
> C: MEMBAR #StoreLoad | #LoadLoad 
> 
> D: MEMBAR #StoreLoad | #StoreStore 
> 
> 
> What about the membar we have to use before atomically unlocking this mutex? 
> 
> 
> A: MEMBAR #LoadLoad 
> 
> B: MEMBAR #StoreLoad | #LoadLoad 
> 
> C: MEMBAR #LoadStore | #StoreStore 
> 
> D: MEMBAR #StoreLoad | #StoreStore

Back to comp.lang.c++ | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Christmas Quiz... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-12-26 13:22 -0800
  Re: Christmas Quiz... "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2022-12-26 23:17 +0100
  Re: Christmas Quiz... Bonita Montero <Bonita.Montero@gmail.com> - 2022-12-27 04:59 +0100
    Re: Christmas Quiz... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-12-27 13:29 -0800
    Re: Christmas Quiz... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-01-04 00:40 -0800
      Re: Christmas Quiz... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-01-04 00:41 -0800
  Re: Christmas Quiz... Michael S <already5chosen@yahoo.com> - 2022-12-27 03:38 -0800
  Re: Christmas Quiz... Michael S <already5chosen@yahoo.com> - 2022-12-27 03:42 -0800
    Re: Christmas Quiz... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-12-27 13:31 -0800
      Re: Christmas Quiz... Michael S <already5chosen@yahoo.com> - 2022-12-27 14:09 -0800
        Re: Christmas Quiz... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-12-27 14:17 -0800
          Re: Christmas Quiz... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-12-29 20:42 -0800
  Re: Christmas Quiz... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-01-04 00:38 -0800
  Re: Christmas Quiz... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-01-17 18:25 -0800

csiph-web