No subject


Sat Nov 12 19:29:10 PST 2005


to understand the mechanism between thread, main memory, and working memory, and the rules
to constrain the related actions.  But from the whole chapter (or the whole book), I cannot figure out:

    Why do threads need to access working copy of variable 
                             (instaead of accessing main memory directly)?

And for the worst situation, each variable access may add 2 extra actions to copy variable (between
main memory and working memory), how does real JVM implementation avoid this?

Huah

------=_NextPart_000_03B1_01C0078E.9230DC40
Content-Type: text/html;
	charset="big5"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Dbig5" http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>Hello all!</DIV>
<DIV>&nbsp;</DIV>
<DIV>From JLS Chapter 17 &amp; JVMS Chapter 8 (although they are almost =
the=20
same), it' s not too hard</DIV>
<DIV>to understand the mechanism between thread, main memory, and =
working=20
memory, and the rules</DIV>
<DIV>to constrain the related actions.&nbsp; But from the whole chapter =
(or the=20
whole book), I cannot figure out:</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Why do threads need to access working copy of =
variable=20
</DIV>
<DIV>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp;&nbsp; (instaead of accessing main memory =
directly)?</DIV>
<DIV>&nbsp;</DIV>
<DIV>And for the worst situation,&nbsp;each variable access&nbsp;may add =
2 extra=20
actions to&nbsp;copy variable (between</DIV>
<DIV>main memory and working memory), how does real JVM implementation =
avoid=20
this?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Huah</DIV></BODY></HTML>

------=_NextPart_000_03B1_01C0078E.9230DC40--


---
To unsubscribe, mail advanced-java-unsubscribe at xcf.berkeley.edu
To get help, mail advanced-java-help at xcf.berkeley.edu



More information about the Advanced-java mailing list