Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 65897 invoked from network); 29 Nov 2005 23:06:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Nov 2005 23:06:38 -0000 Received: (qmail 48032 invoked by uid 500); 29 Nov 2005 23:06:23 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 47840 invoked by uid 500); 29 Nov 2005 23:06:22 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 47829 invoked by uid 99); 29 Nov 2005 23:06:22 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Nov 2005 15:06:22 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [192.63.108.51] (HELO usbb-lacimss1.unisys.com) (192.63.108.51) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Nov 2005 15:07:52 -0800 Received: from USBB-LACGW3.na.uis.unisys.com ([129.224.98.43]) by usbb-lacimss1 with InterScan Messaging Security Suite; Tue, 29 Nov 2005 18:21:28 -0500 Received: from USBB-LACGW3.na.uis.unisys.com ([129.224.98.44]) by USBB-LACGW3.na.uis.unisys.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 29 Nov 2005 18:05:59 -0500 Received: from USRV-EXCH1.na.uis.unisys.com ([129.225.81.6]) by USBB-LACGW3.na.uis.unisys.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 29 Nov 2005 18:05:59 -0500 Received: from USRV-EXCH4.na.uis.unisys.com ([192.61.245.232]) by USRV-EXCH1.na.uis.unisys.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 29 Nov 2005 17:05:58 -0600 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Java databases as alternative to MySQL on OS X Server? (OT) Date: Tue, 29 Nov 2005 17:05:57 -0600 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Java databases as alternative to MySQL on OS X Server? (OT) Thread-Index: AcX1K14PQ6w0yIbHS8So4O7IU+lojwAAKQVw From: "Caldarale, Charles R" To: X-OriginalArrivalTime: 29 Nov 2005 23:05:58.0758 (UTC) FILETIME=[75C2F860:01C5F539] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N > From: Oded Arbel [mailto:oded@m-wise.com]=20 > Subject: Re: Java databases as alternative to MySQL on OS X=20 > Server? (OT) >=20 > Please read up on your Java memory model. What you describe=20 > is a nice abstraction that many Java developers have in their > mind, but is technically not correct and can't be correct when > you consider multiple processors, DMA, hyper-threading or even > just plain old L2 CPU caches. You have to be careful about what viewpoint you're using. From a Java programmer's perspective, as well as actual JVM implementation, what I said is true (although I left out any discussion of volatility and visibility of writes in a multi-CPU system). From a hardware or JIT implementer perspective, what you said is appropriate, since it applies primarily to CPU pipelines and other low-level memory writers (not threads per se), but isn't terribly relevant from a practical Java programming perspective. Essentially all high-performance systems have operated with some variation of these considerations from day one, due to the potential of asynchronous I/O modifying the instruction stream. The introduction of write buffers into CPU pipelines twenty-odd years ago really exacerbated the situation. > Also please note that JSR-133, once implemented, supposedly makes the=20 > whole discussion irrelevant as it forces read/write ordering. Only for intra-thread actions; for inter-thread, ordering is specified primarily with regards to entities marked volatile and synchronized operations. > But AFAIK, only Sun's JVM 5.0 (1.5) implements it and I'm not sure about=20 > its correctness. Actually, JSR 133 largely reflects what the 1.4 HotSpot JVM had already implemented. As you say, the jury is still out on whether all of the low-level synch points have been covered. > You are obviously disregarding the fact that Java is a=20 > multi-platform environment, and some platforms (notably=20 > the Mac OS-X which started the whole thread) does not=20 > provide such a mechanism. The PowerPC instruction set includes lwarx and stwcx for this purpose. If the JIT in the OS X JVM does not generate code to use these for object synchronization, it would be seriously deficient compared to all other commercial JVMs. Without generating such code inline, any multi-threaded interactions are bound to be horribly slow. > Are you an MS-Windows programmer by any chance ? Only when I can't avoid it. Started working on multi-CPU systems in 1969, so I'm quite familiar with synchronization and data visibility concerns. 35+ years of doing software and hardware design on a variety of platforms, including several patents for various features of our systems. Currently responsible for (among other things) the JVM implementation on our 36-bit ones-complement mainframes (and yes, our JVM does pass all the compatibility tests). So much for disregarding multi-platform issues. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org