From owner-freebsd-smp Fri Jun 29 8:44:16 2001 Delivered-To: freebsd-smp@freebsd.org Received: from a.mx.everquick.net (a.mx.everquick.net [216.89.137.3]) by hub.freebsd.org (Postfix) with ESMTP id D593537B403; Fri, 29 Jun 2001 08:44:08 -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 f5TFi4D09415; Fri, 29 Jun 2001 15:44:04 GMT X-EverQuick-No-Abuse: Report any e-mail abuse to Date: Fri, 29 Jun 2001 15:44:03 +0000 (GMT) From: "E.B. Dreger" To: Peter Pentchev Cc: Terry Lambert , Chris Costello , freebsd-smp@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: libc_r locking... why? In-Reply-To: <20010629183352.D535@ringworld.oblivion.bg> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-smp@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 18:33:52 +0300 > From: Peter Pentchev > > > > The threads scheduler is in user space. It converts a > > > blobking call into a non-blocking call plus a context > > > switch. THus blocking _IS_ a problem. > > > > Bad wording on my part again; perhaps "a problem that I [think > > that] I have handled" is better. I'm use nb calls if possible; > > else I have a long-running worker thread. > > I hope you understand that when the worker thread blocks, > it's the process that blocks, and none of the other threads ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Yes. > it's the process that blocks, and none of the other threads ^^^^^^^^^^^^^^^^^^^^^^^^^ > can run until the end of the syscall. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Again, I am *not* using pthreads. Worker thread = totally separate process, created via rfork(2). One process blocks, others continue running. To reiterate: I'm *not* using pthreads or libc_r. I wanted to check my work, and began looking at libc_r code, under the faulty ass-umption that it ran multiple processes. Now that I know that threads are implemented in a single process, and that blocking calls are thunked to non-blocking calls, the locking that I originally questioned makes sense. 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-smp" in the body of the message