From owner-freebsd-arch Tue Nov 30 11:15:34 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 9729814EA5 for ; Tue, 30 Nov 1999 11:15:29 -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 UAA10242 for ; Tue, 30 Nov 1999 20:15:29 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id UAA72280 for freebsd-arch@freebsd.org; Tue, 30 Nov 1999 20:15:28 +0100 (MET) Received: from peach.ocn.ne.jp (peach.ocn.ne.jp [210.145.254.87]) by hub.freebsd.org (Postfix) with ESMTP id E6611159D8 for ; Tue, 30 Nov 1999 11:14:58 -0800 (PST) (envelope-from dcs@newsguy.com) Received: from newsguy.com (dcs@p13-dn02kiryunisiki.gunma.ocn.ne.jp [210.163.200.110]) by peach.ocn.ne.jp (8.9.1a/OCN) with ESMTP id EAA22234; Wed, 1 Dec 1999 04:14:54 +0900 (JST) Message-ID: <38442193.931386B6@newsguy.com> Date: Wed, 01 Dec 1999 04:12:19 +0900 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,pt-BR,ja MIME-Version: 1.0 To: Matthew Dillon Cc: freebsd-arch@freebsd.org Subject: Re: Threads and the scheduler References: <3842DBB5.8AFC9B6@newsguy.com> <199911292022.MAA08694@apollo.backplane.com> <3843D43E.4F40A642@newsguy.com> <199911301732.JAA25846@apollo.backplane.com> <38441379.D8CD6CCD@newsguy.com> <199911301829.KAA26530@apollo.backplane.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Matthew Dillon wrote: > > You are assuming that the application somehow requires more cpu > in a threaded environment verses an unthreaded environment. I am saying > that when you finish up tallying all the cpu the application uses, it > is going to be nearly the same whether the application serializes the > system calls (i.e. unthreaded) or doesn't serialize the system calls. > From the point of view of the UNIX scheduler. No, not at all. For example think of an application with two processes: one does i/o on a tcp socket and the other number-crunches data. It gets converted to threads, so that it is now just one process. Whenever the process "blocks" in the kernel doing i/o, instead of being put to sleep control is returned to it, and it spends the rest of it's quanta doing number-crunching. The scheduler will not identify that process as one who does i/o. But... whatever. I'll just wait and see. -- Daniel C. Sobral (8-DCS) who is as social as a wampas dcs@newsguy.com dcs@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message