From owner-freebsd-hackers Fri Jun 29 11:44:51 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from a.mx.everquick.net (a.mx.everquick.net [216.89.137.3]) by hub.freebsd.org (Postfix) with ESMTP id 3C2BF37B401; Fri, 29 Jun 2001 11:44:45 -0700 (PDT) (envelope-from eddy+public+spam@noc.everquick.net) Received: from localhost (eddy@localhost) by a.mx.everquick.net (8.10.2/8.10.2) with ESMTP id f5TIiXI12135; Fri, 29 Jun 2001 18:44:33 GMT X-EverQuick-No-Abuse: Report any e-mail abuse to Date: Fri, 29 Jun 2001 18:44:29 +0000 (GMT) From: "E.B. Dreger" To: Bernd Walter Cc: Peter Pentchev , Terry Lambert , Chris Costello , freebsd-smp@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: libc_r locking... why? In-Reply-To: <20010629203351.A16557@cicely20.cicely.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Date: Fri, 29 Jun 2001 20:33:51 +0200 > From: Bernd Walter > > I can't see how you make shure that on SMP systems all CPUs have > the same meaning from memory content. > Normaly you would use a mutex or similar before accessing a data range > from another thread which also enshures that the CPU specific caches > and buffers are syncronised. > If you don't do this it may happen that you write a variable and > another thread uses this variable using another CPU before the first > CPU has writen this memory seeable for others and works with an > outdated content. Passing a token between threads. When a thread has the token, it may assert a lock or a mutex on an object. Again, I subscribe to threads being lightweight; cooperative sharing is better than preemptive or trying to grab a lock before another thread does. Any good references on MP standard? Is the lock prefix the only way to force cache coherency? Eddy --------------------------------------------------------------------------- Brotsman & Dreger, Inc. EverQuick Internet Division Phone: +1 (316) 794-8922 Wichita/(Inter)national Phone: +1 (785) 865-5885 Lawrence --------------------------------------------------------------------------- Date: Mon, 21 May 2001 11:23:58 +0000 (GMT) From: A Trap To: blacklist@brics.com Subject: Please ignore this portion of my mail signature. These last few lines are a trap for address-harvesting spambots. Do NOT send mail to , or you are likely to be blocked. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message