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


Groups > comp.lang.java.programmer > #10932

Re: reading the JLS (17.4.5)

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail
NNTP-Posting-Date Wed, 21 Dec 2011 12:56:24 -0600
Date Wed, 21 Dec 2011 10:56:19 -0800
From Patricia Shanahan <pats@acm.org>
User-Agent Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0
MIME-Version 1.0
Newsgroups comp.lang.java.programmer
Subject Re: reading the JLS (17.4.5)
References <slrnjerm1c.fvg.avl@gamma.logic.tuwien.ac.at> <jckv1o$v1v$1@dont-email.me> <slrnjf1iug.fvg.avl@gamma.logic.tuwien.ac.at> <jcqlef$5rp$1@dont-email.me> <B5-dnV9Gn_2ncW3TnZ2dnUVZ_h6dnZ2d@earthlink.com> <slrnjf37mr.fvg.avl@gamma.logic.tuwien.ac.at>
In-Reply-To <slrnjf37mr.fvg.avl@gamma.logic.tuwien.ac.at>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Message-ID <BP-dnedoectFtm_TnZ2dnUVZ_i2dnZ2d@earthlink.com> (permalink)
Lines 31
X-Usenet-Provider http://www.giganews.com
NNTP-Posting-Host 75.11.53.36
X-Trace sv3-fkfRt2XLi/1M3gB7vIUzZIGsGGZBDuxPNeHFbDu7DvhCo6i7xP1ynBVGXQLUPCr80AF61olw1uHA9Pp!hJuVr8RIub0ZPiKDhjvEWNzpGZ4zUcC0XZ4sPYfy9aoug88wfgO/RG6Jg57FiKqBGcEpL9NJAkV9!0lHdvSCysEgthNBVo2EugAHqcPlHQjYadRBLeejnjJo=
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.40
X-Original-Bytes 2649
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:10932

Show key headers only | View raw


On 12/21/2011 12:54 AM, Andreas Leitgeb wrote:
> Patricia Shanahan<pats@acm.org>  wrote:
>> I think "happens-before" should be thought of as short for "must appear
>> to happen before". As the JLS says "It should be noted that the presence
>> of a happens-before relationship between two actions does not
>> necessarily imply that they have to take place in that order in an
>> implementation.
>
> The JLS even explicitly spells out, that to an unrelated thread these
> synchronized-with actions may even appear out of order. This is, what
> confuses me:
>
> T1: hb(A,B)  - not necessarily observed so by T2
> T1,T2:  hb(B,C)
>
> How would T2 "know" about hb(A,C), if it doesn't know hb(A,B) ?
>

T2 does not necessarily "know", but must see the appropriate results
e.g. from its reads. Making that happen is the Java implementation's
problem. How it happens varies depending on the system.

In a small, simple system, with a sequentially consistent hardware
memory model, it may be as simple as writing out any values that are
being held in registers to the appropriate memory locations.

In other situations, it may be necessary to use special instructions,
such as the SPARC membar, to ensure that prior memory operations are
globally visible.

Patricia

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

reading the JLS (17.4.5) Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-12-18 12:10 +0000
  Re: reading the JLS (17.4.5) markspace <-@.> - 2011-12-18 06:57 -0800
    Re: reading the JLS (17.4.5) Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-12-20 17:54 +0000
      Re: reading the JLS (17.4.5) markspace <-@.> - 2011-12-20 10:50 -0800
        Re: reading the JLS (17.4.5) Patricia Shanahan <pats@acm.org> - 2011-12-20 12:12 -0800
          Re: reading the JLS (17.4.5) Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-12-21 08:54 +0000
            Re: reading the JLS (17.4.5) Patricia Shanahan <pats@acm.org> - 2011-12-21 10:56 -0800
              Re: reading the JLS (17.4.5) markspace <-@.> - 2011-12-21 12:02 -0800
  Re: reading the JLS (17.4.5) Patricia Shanahan <pats@acm.org> - 2011-12-18 09:21 -0800
    Re: reading the JLS (17.4.5) Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-12-20 18:35 +0000
      Re: reading the JLS (17.4.5) Lew <lewbloch@gmail.com> - 2011-12-20 19:08 -0800
        Re: reading the JLS (17.4.5) Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-12-21 08:37 +0000
          Re: reading the JLS (17.4.5) Patricia Shanahan <pats@acm.org> - 2011-12-21 10:46 -0800
          Re: reading the JLS (17.4.5) markspace <-@.> - 2011-12-21 12:09 -0800

csiph-web