Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 03 May 2002 07:46:01 -0700
From:      Julian Elischer <julian@elischer.org>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern kern_fork.c
Message-ID:  <3CD2A2A5.11F68277@elischer.org>
References:  <XFMail.20020502111617.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.




-- 
+------------------------------------+       ______ _  __
|   __--_|\  Julian Elischer         |       \     U \/ / hard at work in 
|  /       \ julian@elischer.org     +------>x   USA    \ a very strange
| (   OZ    )                                \___   ___ | country !
+- X_.---._/    presently in San Francisco       \_/   \\
          v

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?3CD2A2A5.11F68277>