From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,1e011d032fd56ab1 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2001-01-05 05:45:21 PST Path: supernews.google.com!sn-xit-02!supernews.com!newsfeed.mesh.ad.jp!sjc-peer.news.verio.net!news.verio.net!iad-read.news.verio.net.POSTED!koehler From: koehler@eisner.decus.org (Bob Koehler) Newsgroups: comp.unix.tru64 Subject: Re: memory barrier help Message-ID: References: <3A548425.2E4007A3@minbar.zko.dec.com> Organization: DECUServe Date: 5 Jan 2001 08:45:17 -0500 NNTP-Posting-Host: 216.44.122.34 X-Complaints-To: abuse@verio.net X-Trace: iad-read.news.verio.net 978702319 216.44.122.34 (Fri, 05 Jan 2001 13:45:19 GMT) NNTP-Posting-Date: Fri, 05 Jan 2001 13:45:19 GMT Xref: supernews.google.com comp.unix.tru64:1349 In article <3A548425.2E4007A3@minbar.zko.dec.com>, Daniel Christians writes: > hi, > > is there a doc, or can someone explain why a > a user application program which uses pthreads > (DECthreads) would need to use the memory barrier > instruction? (or alternatively the wmb instruction). > the application happens to be the java vm. > IIRC DECthreads can run threads simultaneously on different CPUs in an SMP machine. The only way one thread can know that another thread sees a consistent set of data is via a memory barrier. On a single CPU system the memory barrier is only really needed when passing data off to an external device (all Alphas always need to work like multi-processor machines due to this). The code in DECthreads is probably generic and does the MB's any time data could be passed from thread to thread. ---------------------------------------------------------------------- Bob Koehler | Computer Sciences Corporation NASA GSFC Flight Software | Federal Sector, Civil Group | please remove ".aspm" when replying