Date: Tue, 21 Nov 2000 06:59:22 -0500 (EST) From: Daniel Eischen <eischen@vigrid.com> To: Julian Elischer <julian@elischer.org> Cc: Scott Hess <scott@avantgo.com>, jasone@FreeBSD.ORG, arch@FreeBSD.ORG, smp@FreeBSD.ORG Subject: Re: Threads (KSE etc) comments Message-ID: <Pine.SUN.3.91.1001121064952.12667A-100000@pcnet1.pcnet.com> In-Reply-To: <3A1A25C6.99B1B8F3@elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 20 Nov 2000, Julian Elischer wrote: > Daniel Eischen wrote: > > > > > With 2 CPUs, you could have 2 KSEs within the KSEG. Nothing changes > > except that the KSEG workload is spread across 2 KSEs running on > > different CPUs. The quantum for the KSEG, regardless of whether > > there are 1 or more KSEs associated with it, remains the same > > (I would advocate a separate quantum in this case, but I think > > I'm outvoted on that front). > > not entirely > I think a process using two KSEs in a KSEG should be charged for 2. I agree if each KSE gets its own quantum. The way Jason explained it to me (in the case that the KSEG has the quantum), is that if 2 KSEs (in the same KSEG) run concurrently on 2 CPUs, then they would run for 1 quantum each. But the resource usage in the KSEG would be incremented by 2 quantum. > > This is all for PTHREAD_SCOPE_PROCESS threads. PTHREAD_SCOPE_SYSTEM > > threads will be bound to their own KSEG with one KSE. These will > > act more like LinuxThreads; when one of these threads block in > > the kernel, another one will not be executed (because there are no > > other threads allocated for that KSEG/KSE by the threads library). > > well, it WILL do the upcall but the UTS will respond with > "No new thread to schedule, please yield" Yes, exactly because the kernel doesn't know which KSEG is scope process and which KSEGs are scope system. I suppose the kernel could easily know, but there's no reason for it to care. -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.91.1001121064952.12667A-100000>