Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 May 2003 09:16:31 +0300
From:      Valentin Nechayev <netch@netch.kiev.ua>
To:        Daniel Eischen <eischen@pcnet1.pcnet.com>
Cc:        Julian Elischer <julian@elischer.org>
Subject:   Re: libkse and SMP (was Re: USB bulk read & pthreads)
Message-ID:  <20030524061631.GA3167@iv.nn.kiev.ua>
In-Reply-To: <Pine.GSO.4.10.10305231627160.8151-100000@pcnet1.pcnet.com>
References:  <Pine.BSF.4.21.0305231113460.92012-100000@InterJet.elischer.org> <Pine.GSO.4.10.10305231627160.8151-100000@pcnet1.pcnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
 Fri, May 23, 2003 at 16:33:07, eischen (Daniel Eischen) wrote about "Re: libkse and SMP (was Re: USB bulk read & pthreads)": 

DE> I'm not sure if what you meant here, but here's a (hopefully)
DE> clearer explanation.

DE> All threads that are created with PTHREAD_SCOPE_PROCESS
DE> (the default) will run in the same (initial) KSEG.  The
DE> initial KSEG will have as many KSEs as CPUs by default.
DE> When a scope process thread blocks in the kernel, upcalls
DE> are made to the originating KSE and a new thread is scheduled.
DE> When scope process threads unblock in the kernel, upcalls
DE> are made to one or more of the same KSEs within the initial
DE> KSEG to notify the library that the threads can be resumed.

DE> Each scope system thread gets its own KSE/KSEG pair in which
DE> to run.

Sorry, I again lost understanding of this ;((
Consider system with single CPU and 2 threads (with process scope) which
both calls blocking disk read. Can the second thread block in read()
before first thread returns from blocking read()? Or system scope
is required for this?


-netch-



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030524061631.GA3167>