From owner-freebsd-arch Sun Oct 31 19:57: 2 1999 Delivered-To: freebsd-arch@freebsd.org Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (Postfix) with ESMTP id 79C4A14D06 for ; Sun, 31 Oct 1999 19:56:54 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.3/8.9.3) with ESMTP id EAA02383 for ; Mon, 1 Nov 1999 04:56:53 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id EAA70261 for freebsd-arch@freebsd.org; Mon, 1 Nov 1999 04:56:53 +0100 (MET) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (Postfix) with ESMTP id 2A8FE1514A for ; Sun, 31 Oct 1999 19:56:41 -0800 (PST) (envelope-from julian@whistle.com) Received: from home.elischer.org (home.elischer.org [207.76.204.203]) by alpo.whistle.com (8.9.1a/8.9.1) with ESMTP id TAA32046; Sun, 31 Oct 1999 19:56:36 -0800 (PST) Date: Sun, 31 Oct 1999 19:56:34 -0800 (PST) From: Julian Elischer X-Sender: julian@home.elischer.org To: Daniel Eischen Cc: freebsd-arch@freebsd.org Subject: Re: Threads goals version II In-Reply-To: <199911010331.WAA18647@pcnet1.pcnet.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 31 Oct 1999, Daniel Eischen wrote: > > 6/ (contentious) multiple theads should be bound to within the resource > > limits of the single process. > > Multiple processes/LWPs should be allowed to have their own quantum and > not count towards the [parent] process quantum, right? Usually wrong.. usually the desired behaviour is to allow the multiple threads to share the resources (including processors) that are allocated to the process as a whole. If you are the only process running, your threads get to use 100& of cputime. If you are timesharing with 4 other people your threads get to share 20% of the cpu (on average). In reality you will do better than the otherrs as you won't be blocked as much as a single threaded process. I would think that the way to do this would be to expand the priority of the process as a whole and then let your own scheduler (within the process) decide which threads get the time. But that's implementation. do you really want wht you said? It's kind of hard to believe you really want that.. Unless you want to declare a set of kernel shedulable entities to be given their own scheduling group, which would be something you'd have to ask for explicitly. if all teh threads running in a process were doing some sort of 'continuation' scheme, then you migh tuse the 'rfork' schem to produce a second schedulable set of entities that didn't share with the first. (but now we're getting into implementation again.) > > > 9/ there exists a set of primatives that allow threads to influence the > > in-process scheduling between themselves. > > This should also be across multiple LWPs also. Perhaps we need to > state our terminology - I'm not sure if this is what you meant. There are processes. Processes own resources (including a share of the processor time). One process may have a number of kernel schedulable entities, or, stated backwards, a number of shedulable entities that share all their resources are grouped together as a single process. Then in user land there may be several threads of control. They may switch between themselves tranparently to the kernel. it is totally unaware of them. It knows only of the scedulable entities.. This is how I'm starting to envision things from what's been said so far. > > > 14/ your goals here.. > > The ability for the threads library to protect internal data structures > to be safe from priority inversion problems when using multiple LWPs. Priority inversion and inheritance within the userland scheduler.. > > Dan Eischen > eischen@vigrid.com > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message