From owner-freebsd-arch Wed Oct 9 9:33:22 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 562E437B404 for ; Wed, 9 Oct 2002 09:33:21 -0700 (PDT) Received: from park.rambler.ru (park.rambler.ru [217.73.193.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id E524E43E4A for ; Wed, 9 Oct 2002 09:33:19 -0700 (PDT) (envelope-from is@rambler-co.ru) Received: from is (is.stack.net [217.73.193.40]) by park.rambler.ru (8.11.6/8.9.3) with ESMTP id g99GXC075605; Wed, 9 Oct 2002 20:33:13 +0400 (MSD) (envelope-from is@rambler-co.ru) Date: Wed, 9 Oct 2002 20:33:12 +0400 (MSD) From: Igor Sysoev X-Sender: is@is To: Julian Elischer Cc: arch@FreeBSD.ORG Subject: Re: Scheduler framework. In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 9 Oct 2002, Julian Elischer wrote: > If a thread mailbox IS provided: > the syscall is entered. > the thread blocks. A second thread is invoked and attached > to the KSE, which is disconnected from the original thread. Sorry, where did this second thread come from ? > the new thread is set to do an upcall, and since it must not > create any more threads if IT blocks an dsince IT does not have a thread > mailbox, the new thread and the KSE are bound together. > The upcall goes to the user boundary. In thread_userret() the > ksegrp is scanned for any runnable threads that need a KSE to complete. > The upcalling thread is held to one side while the KSE is applied to > each completing thread in turn, and they write their > exit status back to their individual mailboxes. After the last one > is finished, teh upcall is allowed to complete, and reports ALL the > completed syscalls to the userland scheduler. > At some time in the future the original thread is awoken > and cannot proceed due to lack of KSE. THe nect time a KSE is available > or henext time one tries to go to userland, the same scheme as described > above happens and It aquires a KSE for long enough to > run back o the user boundary and write it's completion status back to > the mailbox. it then hands the KSE back t the owner who will upcall > and report the completed thread. Igor Sysoev http://sysoev.ru To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message