Date: Fri, 03 May 2002 11:35:16 -0400 (EDT) From: John Baldwin <jhb@FreeBSD.org> To: Julian Elischer <julian@elischer.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_fork.c Message-ID: <XFMail.20020503113516.jhb@FreeBSD.org> In-Reply-To: <3CD2A2A5.11F68277@elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <jhb@FreeBSD.org> <>< 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20020503113516.jhb>