Message from discussion
x86 Sequential Consistency
Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail
NNTP-Posting-Date: Sun, 19 Nov 2006 18:51:39 -0600
From: "Chris Thomasson" <cris...@comcast.net>
Newsgroups: comp.arch,comp.programming.threads
References: <4s2rp8Ftne37U1@mid.individual.net> <Os2dnWENTcE2i_3YnZ2dnUVZ_sSdnZ2d@comcast.com> <456044a6$0$5710$9b4e6d93@newsspool3.arcor-online.net>
Subject: Re: x86 Sequential Consistency
Date: Sun, 19 Nov 2006 17:05:11 -0800
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
X-RFC2646: Format=Flowed; Response
Message-ID: <mZSdnbfFHdGGYf3YnZ2dnUVZ_u-dnZ2d@comcast.com>
Lines: 25
NNTP-Posting-Host: 76.21.29.207
X-Trace: sv3-fMRMqGz7Guqm+jaSGxe75Bp4jAXPaLE776IOOA5onO+FAaHXpHCVThe0ydpax9qGmVLvaq80JYfisSY!x7FvEytrb0RHbD01ixZTck7Es+Nk1vshRrTU054GdEAuZVapdUItKoWhFAuCFG0ctW4MBuUgdDUw!t1f+MaAL3Ck=
X-Complaints-To: abuse@comcast.net
X-DMCA-Complaints-To: d...@comcast.net
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.32
"Elcaro Nosille" <Elcaro.Nosi...@mailinator.com> wrote in message
news:456044a6$0$5710$9b4e6d93@newsspool3.arcor-online.net...
> Chris Thomasson schrieb:
>
>> http://groups.google.com/group/comp.programming.threads/msg/b0ab2c4405d1c2c6
>> http://groups.google.com/...
>> http://groups.google.com/...
>
> Why do you think fences are necessary. When we're synchronizing threads,
> we're at least using an atomic op which does the fencing for us.
Fences are necessary on x86 when your algorithm can't handle the fact that a
store followed by a load to another location can, and will, be reordered...
For instance, Petersons Algorithm needs to use an mfence in order to prevent
the latter load from the other state variable from migrating above the lock
acquisition logic:
http://groups.google.com/group/comp.programming.threads/browse_frm/thread/c49c0658e2607317
(if you study the code, you should know exactly why a mfence is needed...)
;^)