From owner-java@jp.FreeBSD.org Fri Jul 19 01:39:22 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id g6IGdMv58929;
	Fri, 19 Jul 2002 01:39:22 +0900 (JST)
	(envelope-from owner-java@jp.FreeBSD.org)
Received: from cs20.catv.ne.jp (cs20.catv.ne.jp [202.232.171.40])
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with ESMTP/inet id g6IGdLn58898
	for <java@jp.FreeBSD.org>; Fri, 19 Jul 2002 01:39:21 +0900 (JST)
	(envelope-from yamasa@ec.catv.ne.jp)
Received: from localhost by cs20.catv.ne.jp (8.9.1/3.7W)
	id BAA20973; Fri, 19 Jul 2002 01:39:18 +0900 (JST)
Date: Fri, 19 Jul 2002 01:39:20 +0900 (JST)
Message-Id: <20020719.013920.74753632.yamasa@ec.catv.ne.jp>
To: java@jp.FreeBSD.org, kkonaka@mac.com
From: OISHI Masakuni <yamasa@ec.catv.ne.jp>
In-Reply-To: <sqbptxl5atc.wl@nue.mac.com>
References: <sqbptxl5atc.wl@nue.mac.com>
X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Reply-To: java@jp.FreeBSD.org
Precedence: list
X-Sequence: java 126
Subject: [java 126] Re: Java Memory Model
Errors-To: owner-java@jp.FreeBSD.org
Sender: owner-java@jp.FreeBSD.org
X-Originator: yamasa@ec.catv.ne.jp
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+020717

$BBg@P$G$9!#(B

From: kkonaka@mac.com
Subject: [java 123] Java Memory Model
Date: Thu, 18 Jul 2002 11:13:03 -0400

> $B$D$$$G$K$b$&$R$H$D(B...
> 
> $B@h!9=5$"$?$j$3$N%;%/%7%g%s$,$"$k$N$K=i$a$F5$$,IU$$$F(B
> http://java.sun.com/docs/books/jls/second_edition/html/memory.doc.html#28325
>  | 17.6 Rules about the Interaction of Locks and Variables
>  |    Let T be any thread, let V be any variable, and let L be any lock.
>  |    There are certain constraints on the actions performed by T with
>  |    respect to V and L:
>  |      * ... (Less formally: if a thread is to
>  |        perform an unlock action on any lock, it must first copy all
>  |        assigned values in its working memory back out to main memory.)
>  |      * ...(Less formally: a lock action acts as if it flushes
>  |        all variables from the thread's working memory; before use they
>  |        must be assigned or loaded from main memory.)
> 
> $B$*$b$7$m$$$J$H;W$C$?$N$G$9$,$3$l$K4XO"$7$F!JJY6/$,$F$i!K(B
> $B$[$+$KFI$s$G$*$/$HLLGr$=$&$J$b$N$H$$$&$N$O$J$K$+$*$9$9(B
> $B$a$"$j$^$9$G$7$g$&$+!)(B

$BDjHV$H$7$F$O!"(BSingleton$B%Q%?!<%s$N<B8=J}K!$N0l$D$H$7$F(B
$B>R2p$5$l$k$3$H$,$"$k(B "Double-Checked Locking" $B$H$$$&9=J8$,(B
$B<B$O4V0c$C$F$$$k$H$$$&5-;v$G$7$g$&$+!#(B

http://www.javaworld.com/javaworld/jw-02-2001/jw-0209-double.html
http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html

$B;d$b$3$N5-;v$r=i$a$FFI$s$@$H$-$O!"%9%l%C%I%W%m%0%i%_%s%0$N1|?<$5$K(B
$B46?4$9$k$P$+$j$G$7$?!#(B

--
$BBg@P>-K.(B
yamasa@ec.catv.ne.jp
