From owner-cvs-all Fri May 3 8:35:36 2002 Delivered-To: cvs-all@freebsd.org Received: from mail.speakeasy.net (mail12.speakeasy.net [216.254.0.212]) by hub.freebsd.org (Postfix) with ESMTP id 56F3037B41C for ; Fri, 3 May 2002 08:35:26 -0700 (PDT) Received: (qmail 17131 invoked from network); 3 May 2002 15:35:23 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail12.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 3 May 2002 15:35:23 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.11.6/8.11.6) with ESMTP id g43FZMF11895; Fri, 3 May 2002 11:35:22 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <3CD2A2A5.11F68277@elischer.org> Date: Fri, 03 May 2002 11:35:16 -0400 (EDT) From: John Baldwin To: Julian Elischer Subject: Re: cvs commit: src/sys/kern kern_fork.c Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 03-May-2002 Julian Elischer wrote: > John Baldwin wrote: >> > >> > - Document a really weird race that will come up with KSE allows >> > multiple >> > kernel threads per process. >> >> s/with/when/ > > I checked out your comment.... > > This race is already taken care of in the KSE branch. > Both exit and fork (and exec) have 'single-threading' funnels, that ensure > that they are the only thread running before permitting the active > thread to progress further into the > given function. They know about each other to some extent and there is a > priority > in that if one thread enters exit() and another enters fork() a moment later, > that doing the fork will suicide, and that entering exit() will only be > allowed > to > continue when all other threads have done themselves in. In the case where > the > fork() is fractionally ahead, the exiting thread will suspend until the fork > has completed. > > There's more to than that of course but that's the gist of it. Hmm, one thing I'm assuming in some places is that exec() will _require_ a non-KSE process. I.e., if you want to do an exec() from a KSE process, first fork() a new process w/o threads and then let it do the exec(). At least, this is what we sort of agreed to back when you, Peter, and I met and talked about the scheduler several months ago. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message