From owner-freebsd-hackers Fri Jun 29 11:33:24 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by hub.freebsd.org (Postfix) with ESMTP id 41CEF37B403; Fri, 29 Jun 2001 11:33:16 -0700 (PDT) (envelope-from ticso@mail.cicely.de) Received: from mail.cicely.de (cicely20 [10.1.1.22]) by srv1.cosmo-project.de (8.11.0/8.11.0) with ESMTP id f5TIXD658164; Fri, 29 Jun 2001 20:33:13 +0200 (CEST) Received: (from ticso@localhost) by mail.cicely.de (8.11.0/8.11.0) id f5TIXvJ17293; Fri, 29 Jun 2001 20:33:57 +0200 (CEST) Date: Fri, 29 Jun 2001 20:33:51 +0200 From: Bernd Walter To: "E.B. Dreger" Cc: Peter Pentchev , Terry Lambert , Chris Costello , freebsd-smp@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: libc_r locking... why? Message-ID: <20010629203351.A16557@cicely20.cicely.de> References: <20010629183352.D535@ringworld.oblivion.bg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from eddy+public+spam@noc.everquick.net on Fri, Jun 29, 2001 at 03:44:03PM +0000 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 On Fri, Jun 29, 2001 at 03:44:03PM +0000, E.B. Dreger wrote: > Again, I am *not* using pthreads. Worker thread = totally separate > process, created via rfork(2). One process blocks, others continue > running. 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. A fresh rforked process with the same virtual memory should at least see the version at the time of the rfork, so there is no problem if you don't modify the common used content after rfork. -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message